From: hooft@fys.ruu.nl (Rob Hooft) Subject: Re: olvwm's WINMENU doesn't work. Date: 7 Jan 1993 16:41:07 GMT
In <andrewc.726395885@aurora.cc.monash.edu.au> andrewc@aurora.cc.monash.edu.au (Andrew J. Cosgriff !) writes:
>dhliu@solar.csie.ntu.edu.tw (Der-Hua Liu) writes:
>>When I add the WINMENU line, the olvwm generates the following message on the
>>console:
>>
>> "Memory allocation problem"
>>and olvwm and X server die.
>Yep. DIRMENU does the same, and you can't run X again until you take the line out
>or use another window manager...
>There was a fix mentioned a while ago (no actual patch, just a 'where to look')
>when I asked the same question, but I don't have it and never had time to do it then
>But i do now...Anyone remember what it was ?
>(something to do with malloc(0) or something)
Recompile while making sure that stdlib.h is included in all
source-files, and that NO_FIX_MALLOC is not defined. That is at least
what I understood some time ago, it could have changed in the mean
time. The bug results from trying to allocate 0 bytes of storage. GNU
malloc denies this, and olvwm thinks there is no memory left.
In stdlib.h there is a 'malloc' macro, wich calls the malloc()
function with an argument of 1 instead of 0 in this case. This kludge
wastes a byte of memory, but seems to work.
-- Rob W.W. Hooft, Department of crystal and structural chemistry Bijvoet Center for Biomolecular Research, University of Utrecht The Netherlands ===== hooft@chem.ruu.nl (hooft@hutruu54.bitnet) ====Use a Real Operating System on your 386: Linux is FREE!====