Date: Tue, 16 Feb 1999 22:46:46 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: dyson@iquest.net Cc: toasty@home.dragondata.com, mike@smith.net.au, hackers@FreeBSD.ORG Subject: Re: vm_page_zero_fill Message-ID: <199902162246.PAA08400@usr08.primenet.com> In-Reply-To: <199902160441.XAA00469@y.dyson.net> from "John S. Dyson" at Feb 15, 99 11:41:25 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > Perhaps a change that would allow for malloc()'ed and new'ed memory to be > > able to take memory from the to-be-zero'ed list would be better, although > > that may be more work than I'm looking for.... > > That *might* be reasonable. A special sbrk or somesuch. That sbrk > would make a non-prezeroed map entry. vm_fault would just avoid > doing the zero. Expecting sbrk'ed pages to be zero filled is just *wrong*. Sorry, but there is a *reason* that there are seperate malloc(3) and calloc(3) routines. The former is seperate from the latter because uncleared pages are supposed to occur faster, and because there was an expectation that the malloc(3) could return space already allocated to the process. Indeed, the ANSI C specification practically *prohibits* breaking memory back to the system, since it *requires* that a free'd region of a given size be re-malloc'able without a check of the malloc return code (though it doesn't guarantee contents). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902162246.PAA08400>