process.cc (2817:273f7fb94f83) | process.cc (3005:ceb86e85d62d) |
---|---|
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; --- 305 unchanged lines hidden (view full) --- 314 } 315 int env_data_size = 0; 316 for (int i = 0; i < envp.size(); ++i) { 317 env_data_size += envp[i].size() + 1; 318 } 319 320 int space_needed = 321 argv_array_size + envp_array_size + arg_data_size + env_data_size; | 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; --- 305 unchanged lines hidden (view full) --- 314 } 315 int env_data_size = 0; 316 for (int i = 0; i < envp.size(); ++i) { 317 env_data_size += envp[i].size() + 1; 318 } 319 320 int space_needed = 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; | 322 if (space_needed < 32*1024) 323 space_needed = 32*1024; |
325 326 // set bottom of stack 327 stack_min = stack_base - space_needed; 328 // align it 329 stack_min = roundDown(stack_min, pageSize); 330 stack_size = stack_base - stack_min; 331 // map memory 332 pTable->allocate(stack_min, roundUp(stack_size, pageSize)); --- 177 unchanged lines hidden --- | 324 325 // set bottom of stack 326 stack_min = stack_base - space_needed; 327 // align it 328 stack_min = roundDown(stack_min, pageSize); 329 stack_size = stack_base - stack_min; 330 // map memory 331 pTable->allocate(stack_min, roundUp(stack_size, pageSize)); --- 177 unchanged lines hidden --- |