Date: Wed, 22 Nov 2000 15:11:30 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: "Michael N. Filippov" cc: djgpp AT delorie DOT com Subject: Re: Q: SBRK algorithms In-Reply-To: <8vgec7$31bj$1@news.itfs.nsk.su> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 22 Nov 2000, Michael N. Filippov wrote: > Where can read about malloc -> sbrk -> DPMI server memory allocation > algorithms and configurations ? In the library sources only, I'm afraid. People who wrote that stuff are still here, so you can ask questions, if something in the sources is not clear. > I know that in this chain each part > keeps some info and tries to group requested memory. It is interesting > because I'd like to know limitations and how much memory this keeping > takes for each stage to use more memory Put it simply, sbrk allocates in chunks of 64KB, and malloc has a fixed overhead of 8 bytes per allocated buffer. > But what is default or UNIX strategy I dont know, Sorry if this is a silly > question: I'm a nebie in DJGPP. I really cannot imagine that these fine details could be of any practical importance, unless you have specific problems, like a memory-intensive program that refuses to run because it fails to allocate enough memory. (If this is the case, please describe the details and then ask specific questions about your case.) If you want to study the memory allocation used by DJGPP, I can tell what source files to read, as a starting point.