Some time ago, Ben Wing wrote...
Help! I just patched up my workspace-o-mammoth-changes from 21.2.27
to
21.2.30, and now temacs bombs out right at the beginning, with:
runtime error R6027
- not enough space for lowio initialization
I've never seen that, just looking for a clue in CRT sources.
The only place which produces this error is:
ioinit.c (_ioinit):
/*
* Allocate and initialize the first array of ioinfo structs. This
* array is pointed to by __pioinfo[0]
*/
if ( (pio = _malloc_crt( IOINFO_ARRAY_ELTS * sizeof(ioinfo) ))
== NULL )
{
_amsg_exit( _RT_LOWIOINIT ); /* RT error 6027 --kkm */
}
IOINFO_ARRAY_ELTS is a macro, defined to 32.
typedef struct {
long osfhnd; /* underlying OS file HANDLE */
char osfile; /* attributes of file (e.g., open in text mode?) */
char pipech; /* one char buffer for handles opened on pipes */
#ifdef _MT
int lockinitflag;
CRITICAL_SECTION lock;
#endif /* _MT */
} ioinfo;
so that sizeof(ioinfo)==8, _MT is not defined.
From dbgint.h, when _DEBUG is off (we are building with libc, compiled with debug
off):
#define _malloc_crt malloc
Thus CRT uses our malloc in gmalloc.c, so you can break there and see why does
it fail.
I just set up a breakpoint in malloc(), and the first call to malloc seems to
originate at that place:
malloc(unsigned int 256) line 549
XEMACS! _ioinit + 17 bytes
XEMACS! mainCRTStartup + 116 bytes
cache_system_info() line 47
0082ffe0()
0082ffc0()
Looks like the problem is that malloc() fails when called even for the first time.
Big K