OS/2, eCS & ArcaOS - Technical > Internet

PMMail and EARLYMEMINIT=TRUE problem?

<< < (4/4)

Lars:
There is an unfortunate twist with EARLYMEMINIT=TRUE.

There is a dynamic memory allocation DevHelper called "VMAlloc" that is to be used by kernel/driver SW. There exists a flag called "VMDHA_USEHIGHMEM" that does exactly what EARLYMEMINIT = TRUE is supposed to do: it allows to allocate memory above the 16 MByte physical address boundary on driver init (and only on driver init). For some reason I don't know, a call to VMAlloc with flag "VMDHA_USEHIGHMEM" will FAIL if "EARLYMEMINIT=TRUE" is specified.
But if you do not specify flag "VMDHA_USEHIGHMEM" along with "EARLYMEMINIT=TRUE" , then the allocation will be successful and will use memory > 16 MB address boundary.
 
The only solution to ensure that (on driver init) you can allocate memory above the 16 MBYTE physical address boundary is to try to allocate with "VMDHA_USEHIGHMEM" flag and if that fails to retry without this flag. That way, you will succeed one way or the other (unless you have too little memory in general).

Therefore, I suspect that all those drivers that fail with "EARLYMEMINIT=TRUE" set in config.sys try to dynamically allocate memory on driver init with "VMDHA_USEHIGHMEM" flag set and would likely work OK if the binary were patched to NOT set the VMDHA_USEHIGHMEM flag.


Lars

Navigation

[0] Message Index

[*] Previous page

Go to full version