delorie.com/archives/browse.cgi | search |
> Newsgroups: comp.os.msdos.djgpp > Date: Fri, 6 Jul 2001 01:12:27 +0100 (BST) > From: Daniel Barker <sokal AT holyrood DOT ed DOT ac DOT uk> > > How about if DJGPP malloc() always returned NULL (without even trying) for > any allocation request exceeding n bytes, where n is the size of the > largest dynamic array one can ever get with DOS/DPMI? It turns out this is next to impossible to do: some DPMI hosts lie about the largest allocation they can satisfy. So in the next release of DJGPP, malloc will fail any attempt to allocate more than 2GB - 64KB + 1 (we subtract 64KB because sbrk rounds up the allocations to the nearest multiple of 64KB, before it asks the DPMI server for more memory).
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |