🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.misc
Article #994

Microsoft Windows

#994
From: P.C. Bahrs
Date: Wed, 17 Aug 1988 20:29
34 lines
1401 bytes
Given the following code fragments:

#define INITIAL_SIZE 4000
#define NEWSIZE 8000
GLOBALHANDLE *hData [10];
float FAR *lpfDATA [10];


if (NULL == (hData [X] = GlobalAlloc (GHND, (DWORD) INITIAL_SIZE)))
   return FALSE;
....
if (NULL == (hTemp = GlobalRealloc (hData [X], (DWORD) NEW_SIZE, GHND)))
    return FALSE;
....
if (NULL != GlobalFree ((GLOBALHANDLE) hData [X]))
   return FALSE;
....
if ((NULL == (lpfDATA[X] = (float FAR *) GlobalLock ((GLOBALHANDLE) hData [X])))
   return FALSE;
...
GlobalUnlock ((GLOBALHANDLE) hData [X]);
...

The system works great if code segments are all MOVEABLE, but if the
code segments are marked as MOVEABLE DISCARDABLE and some data has been
loaded into the system AND HeapWalk is run to allocate all of memory...
the infamouse DEV AUX error appears!  This error does not appear if the
data is not loaded (i.e. the User Interface seems robust).  Does anyone
have any comments?

Also, is there a way to bypass or trap the DEV AUX error? (which causes
the user to warm boot!)

Reply on News or :   pcb@usl.usl.edu  csnet
Technical Details
Message-ID: <399@usl.usl.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!dalsqnt!usl!pcb

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!dalsqnt!usl!pcb
From: pcb@usl.usl.edu (P.C. Bahrs)
Newsgroups: comp.windows.misc
Subject: Microsoft Windows
Keywords: GlobalAlloc, memory, moveable, fixed
Message-ID: <399@usl.usl.edu>
Date: 17 Aug 88 20:29:39 GMT
Organization: CACS, Lafayette, LA, USA
Lines: 34