Subject: SDL-News: Changing the Standard Memory Allocation Procedure for TAU 4.1
From: Rodrigo Georges Tannuri (rodrigo.tannuri#digitro.com.br)
Date: Thu Jul 12 2001 - 18:19:30 GMT
Hi:
Maybe somebody can help me:
I need to change the standard memory allocation procedure for some systems developed using TAU 4.1, because I have little memory available. The reference manual says:
"Changing the Standard Memory Allocation Procedure
In this section we describe how it is possible to re-implement the memory handling functions to avoid the standard avail lists and how to customize memory reuse.
The basic tools are the sctos.c functions:
xGetPId xReleasePId
xGetService xReleaseService
xGetSignal xReleaseSignal
xGetPrd xReleasePrd
The xGet functions mentioned above will be called each time a process, service, signal, or procedure is to be created. The functions first look in their avail lists and only if this is empty a new data area is created. The Get functions then initializes the data area. By changing the implementation of these functions it is possible to allocate memory in any suitable way.
The xRelease functions listed will be called when a process, service, signal, or procedure is to be returned to the pool of free memory. In the standard implementation the memory is returned to the avail list for the object. By changing these functions, memory may be returned to the pool of available memory in any way. (By not entering the memory in the avail list, the xAlloc function above will always be called when memory is needed.)",
but, changing all the functions above I didn't have any sucess.
How can I change this functions to release memory to the pool of free memory?
Thanks.
Rodrigo Tannuri.
In this section we describe how it is possible to re-implement the memory handling functions to avoid the standard avail lists and how to customize memory reuse.
The basic
tools are the sctos.c
functions:
The xGet
functions mentioned above will be called each time a
process, service, signal, or procedure is to be created. The functions first
look in their avail lists and only if this is empty a new data area is created.
The Get
functions then initializes the data area. By
changing the implementation of these functions it is possible to allocate memory
in any suitable way.
The xRelease
functions listed will be called when a process,
service, signal, or procedure is to be returned to the pool of free memory. In
the standard implementation the memory is returned to the avail list for the
object. By changing these functions, memory may be returned to the pool of
available memory in any way. (By not entering the memory in the avail list, the
xAlloc
function above will always be called when memory
is needed.)",
This archive was generated by hypermail 2a23 : Thu May 09 2013 - 16:05:49 GMT