Re: 2GB malloc impossible ?

Jakub Jelinek (jj@sunsite.ms.mff.cuni.cz)
Thu, 8 Apr 1999 16:34:04 +0200 (CEST)


>
> Hi Riley.
>
> >I would suspect that's the space occupied by the kernel image and
> >whatever programs you're running at the time...
>
> I believe 700Mb is too much for kernel image, etc.: I can run two
> processes simultaneously each one malloc'ing and intensively memset'ing
> its own (1GB - eps) without Any swapping.
>
> BTW 700Mb looks like a hardcoded constant - it is always the same
> (0x2aaab000) with the only exception: systems with 3:1 split prefer to
> start allocation at smth like 0x4000b000.

Of course, it is a hardcoded constant, look in asm/processor.h
#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)

That defines where kernel starts looking for free areas available for
mmaping.
On the other side, if you mmap with a chosen virtual address, you should be
able to mmap more, of course provided your application is statically linked.
Otherwise stuff like shared libraries and dynamic linker will have to be
mapped somewhere as well (in that case, see ELF_ET_DYN_BASE in asm/elf.h).

Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
UltraLinux | http://ultra.linux.cz/ | http://ultra.penguin.cz/
Linux version 2.2.5 on a sparc64 machine (3958.37 BogoMips)
___________________________________________________________________

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/