Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79724
b: refs/heads/master
c: 5bafb67
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Jan 30, 2008
1 parent b04acbf commit 20a6fa1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ec875666d826dc6ea228afc9f6b644165081ab5
refs/heads/master: 5bafb671e20d2a3721589378681326197fc37a5f
10 changes: 5 additions & 5 deletions trunk/arch/x86/ia32/mmap32.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@
*
* Leave an at least ~128 MB hole.
*/
#define MIN_GAP (128*1024*1024)
#define MAX_GAP (TASK_SIZE/6*5)
#define MIN_GAP (128 * 1024 * 1024)
#define MAX_GAP (TASK_SIZE / 6 * 5)

static inline unsigned long mmap_base(struct mm_struct *mm)
{
unsigned long gap = current->signal->rlim[RLIMIT_STACK].rlim_cur;
unsigned long random_factor = 0;

if (current->flags & PF_RANDOMIZE)
random_factor = get_random_int() % (1024*1024);
random_factor = get_random_int() % (1024 * 1024);

if (gap < MIN_GAP)
gap = MIN_GAP;
Expand All @@ -66,8 +66,8 @@ void ia32_pick_mmap_layout(struct mm_struct *mm)
* bit is set, or if the expected stack growth is unlimited:
*/
if (sysctl_legacy_va_layout ||
(current->personality & ADDR_COMPAT_LAYOUT) ||
current->signal->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY) {
(current->personality & ADDR_COMPAT_LAYOUT) ||
current->signal->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY) {
mm->mmap_base = TASK_UNMAPPED_BASE;
mm->get_unmapped_area = arch_get_unmapped_area;
mm->unmap_area = arch_unmap_area;
Expand Down

0 comments on commit 20a6fa1

Please sign in to comment.