This routine is not provided with a save area. In addition to the linkage registers, this routine may freely alter registers 2 and 4.
If you provide your own EDCXFREE routine, it will be used when C library functions explicitly free storage. Whenever the library functions invoke operating-system services, there may be implicit requests to free storage that cannot be tailored.
Figure 1 shows an example of a routine that is used to free storage.
* this is an example of a routine to free storage
EDCXFREE CSECT
EDCXFREE AMODE ANY
EDCXFREE RMODE ANY
@@XFREE DS 0H
ENTRY @@XFREE
BALR R2,0
USING *,R2
*
FREEMAIN RC,SP=0,LV=(0),A=(1)
BR R14 return
*
R2 EQU 2
R14 EQU 14
END