Mail Archives: djgpp/1995/11/29/13:23:06
> I know that multiple DXEs can be loaded simultaneously (I tested it). My
> question is this: is there a way to free the memory occupied by a loaded DXE?
Yes, but you have to do a tiny bit of work. Look at the dxeload.c source.
As you can see, the returned pointer has the symbol offset added to the base
of the malloced block. You must read the header in the DXE file yourself
(just swipe the code out of DXELOAD) and then subtract the offset from the
returned pointer. Or you can just clone this entire routine and write your
own _dxe_load_2(name, &pointer) or something. When I wrote this routine
I didn't think most people would be unloading it, and wanted the code to
be as small and simple as possible (since it gets sucked into every image
anyone writes...
> Thanks for your help. BTW, I'm using the V2 beta, of course (isn't that the
> only thing that supports DXEs?).
Actually, you should be able to compile the routines and use them under V1.x
also, but I have been using V2 for about 18 months exclusively now and
don't test under V1 anymore.
- Raw text -