process.cc (2715:4032e02b525e) process.cc (2800:18a615ca6e19)
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 312 unchanged lines hidden (view full) ---

321 argv_array_size + envp_array_size + arg_data_size + env_data_size;
322 // for SimpleScalar compatibility
323 if (space_needed < 16384)
324 space_needed = 16384;
325
326 // set bottom of stack
327 stack_min = stack_base - space_needed;
328 // align it
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 312 unchanged lines hidden (view full) ---

321 argv_array_size + envp_array_size + arg_data_size + env_data_size;
322 // for SimpleScalar compatibility
323 if (space_needed < 16384)
324 space_needed = 16384;
325
326 // set bottom of stack
327 stack_min = stack_base - space_needed;
328 // align it
329 stack_min &= ~(intSize-1);
329 stack_min = roundDown(stack_min, pageSize);
330 stack_size = stack_base - stack_min;
331 // map memory
330 stack_size = stack_base - stack_min;
331 // map memory
332 pTable->allocate(roundDown(stack_min, pageSize),
333 roundUp(stack_size, pageSize));
332 pTable->allocate(stack_min, roundUp(stack_size, pageSize));
334
335 // map out initial stack contents
336 Addr argv_array_base = stack_min + intSize; // room for argc
337 Addr envp_array_base = argv_array_base + argv_array_size;
338 Addr arg_data_base = envp_array_base + envp_array_size;
339 Addr env_data_base = arg_data_base + arg_data_size;
340
341 // write contents to stack

--- 166 unchanged lines hidden ---
333
334 // map out initial stack contents
335 Addr argv_array_base = stack_min + intSize; // room for argc
336 Addr envp_array_base = argv_array_base + argv_array_size;
337 Addr arg_data_base = envp_array_base + envp_array_size;
338 Addr env_data_base = arg_data_base + arg_data_size;
339
340 // write contents to stack

--- 166 unchanged lines hidden ---