[Gc] Patch for dealing with OOM in GC_wince_get_mem and GC_remap (Win32)

Ivan Maidanski ivmai at mail.ru
Fri Sep 11 01:09:05 PDT 2009


Hi!

This small patch (ivmai125.diff) fixes 2 issues:
- handles VirtualAlloc() NULL result in GC_wince_get_mem() (when reserving memory);
- produces abort with "Ouf-of-memory" message in GC_remap() if VirtualAlloc() fails because of not enough memory (in fact, this should be temporary, since out-of-memory even should be handled somehow by GC_remap() callers, but this would require much more code changes (and code verification efforts), so, for now, FIXME is present for it). (Also, unclear what to do in the non-Win32 case.)

ChangeLog entries:

	* os_dep.c (GC_wince_get_mem): If VirtualAlloc() returns NULL (due
	to out of memory) then don't increment GC_n_heap_bases and don't
	call VirtualAlloc() again (with MEM_COMMIT).
	* os_dep.c (GC_remap): Abort with a more informatory message if
	VirtualAlloc() fails due to out of memory; update FIXME.

Bye.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ivmai125.diff
Type: application/octet-stream
Size: 1312 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20090911/bd39c0f0/ivmai125.obj


More information about the Gc mailing list