Date: Fri, 24 Mar 95 12:35 GMT From: "Kevin Ashley, Systems Development, ULCC" To: DJGPP Subject: RE: conventional memory A Appleyard asks: ... > > Re these dpmi functions:- > (1) "If there isn't enough memory in the system, INFO->size := the largest >available size, and an error is returned.": What is the most conventional >memory store that I am likely to be allowed? What is the most that I can ask >for without seriously impeding djgpp's and dpmi's working? It isn't djgpp and dpmi that you will be impeding as such. This memory is the DOS-controlled memory: the stuff below the 640K that almost all your DOS applications run in. The amount you can get depends on the size of GO32 (a constant for any particular release of it) and the amount of TSRs, device drivers and other stuff lurking around in low memory before you try to grab some for yourself. You can guarantee you will never get more than 640k in total from all allocations :-) I guess you can't get more than 64K from any one allocation. If you ask for too much you won't be able to spawn other programs since there won't be any low memory for them. > (2) If I use _go32_dpmi_resize_dos_memory to change my conventional memory >allocation from x bytes to y bytes, can I trust the bottom min(x,y) bytes of >my conventional memory allocation to keep the same values? Yes. > (3) What happens if I call _go32_dpmi_allocate_dos_memory twice without >calling _go32_dpmi_free_dos_memory between? Do I get two separate allocations? Yes. Think of it as a complicated malloc with lots of restrictions. But otherwise, you're just grabbing and releasing things which are independent of each other. However, like malloc, you can run into fragmentation problems if you grab a lot of things and then free only some of them. ------------------------------------------------------------------------------ Kevin Ashley K DOT Ashley AT Ulcc DOT ac DOT uk Systems Development Group Manager http://www.ulcc.ac.uk/staff/Kevin+Ashley University of London Computer Centre. ...ukc!ncdlab!K.Ashley This is not a signature