Messages in this thread |  | | Date | Fri, 19 Jul 1996 12:26:26 +0200 (MET DST) | From | Peter Van Eynde <> | Subject | change of policy on mmap? |
| |
Hello world,
I'm porting a program to Linux that mmaps 128+ MB on startup, but it only uses about 16 megs of it. The reasons for this bad design is that it uses a copying garbage collector with different "segments" to store data in.
The memory is mmaped rwx, anonymous, private and static. Thus linux 2.0.x always checks if there is enough mem+swap for this --- I don't want this to happen.
1 How can I tell the kernel to mmap it, but _not_ to check if it is available. How should I modify the mmap call, or could you add another flag?
2 To trow away data (copying gc...) I should do mmap with /dev/null, right? (or was it /dev/zero)
I remember that a while ago there was a thread on usenet about "malloc lies in Linux". It was then said that mallocing 1GB was ok, so long as you didn't use the memory. Has policy changed or is mmap(rwx) so different?
The original porter (to FreeBSD) points to the "superior" vm of FreeBSD, I just want to choose whether I check or don't check.
Groetjes, Peter
-- It's logic Jim, but not as we know it. finger natst3@hipe.uia.ac.be for pgp public key. -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GS/CS/L/C d->? s+:++>+@ a-- C++(+++)>$ ULOS++>++++$ P+>++++ L+++>++++ E>++ W+(--) U++>+++ o>+ K? w--- O>+@ M-? V? PS++ PE(--) Y+ PGP+>++ t++>+++ 5++ X++>+++ R tv b+++>++++ DI? D++@ G+>++ e++>++++ h!>+ r-@ y>+++**@ ------END GEEK CODE BLOCK------
|  |