Aucbvax.5687
fa.info-vax
utzoo!decvax!ucbvax!info-vax
Mon Jan  4 13:48:20 1982
Dynamic Memory
>From RUBENSTEIN@HARV-10 Mon Jan  4 13:45:51 1982
You can write your own LIB$GET_VM, then link with /NOSYSSHR to be sure
that all the other memory allocation is done through your routine.
I wouldn't worry about it too much;  what language are you using?  LIB$GET_VM
is really only called by the dynamic string routines.  If you don't use
these then maybe you don't have a problem.  The system services (as opposed
to the runtime library) do NOT call LIB$GET_VM or any other runtime library
routine.  Is LIB$GET_VM linked into your program as it is now?  Use
LINK/MAP/CROSS to find out who calls it if so.  If LIB$GET_VM is not required
for other reasons, then you can use the $EXPREG and $CNTREG system services
to allocate and deallocate space at the end of the program region.  If
dynamic memory is required for reasons other than your contiguous buffers,
then you'll have to allocate it somewhere else.  So, my suggestion:

       1) Write an initial version which uses $EXPREG and $CNTREG
               without calling LIB$GET_VM
       2) Check to see if LIB$GET_VM is still being linked into your
               image.
       3) If not, you win.  If so, then you'll have to allocate a fixed
               space somewhere else, and write a LIB$GET_VM that allocates
               from this space, and a LIB$FREE_VM that deallocates to
               this space.

Good luck!
Stew

-----------------------------------------------------------------
gopher://quux.org/ conversion by John Goerzen <[email protected]>
of http://communication.ucsd.edu/A-News/


This Usenet Oldnews Archive
article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.

2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.