|
The customer is correct. There is a memory leak in the
Alpha version of the code (not on VAX). It's a new bug
for V7 of OpenVMS Alpha so someone should hopefully fix it.
Just because it is obsolete does not mean it should not
work correctly.
C $ type test.c
#include <stdio.h>
#include <unistd.h>
#include <lib$routines.h>
#include <str$routines.h>
#include <descrip.h>
main( )
{
$DESCRIPTOR(sysout, "SYS$OUTPUT") ;
struct dsc$descriptor outd = { 0, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0} ;
for(;;) {
lib$show_vm(0, 0, 0) ;
lib$sys_trnlog(&sysout, 0, &outd) ;
lib$show_vm(0, 0, 0) ;
str$free1_dx(&outd) ;
lib$show_vm(0, 0, 0) ;
sleep(1) ;
}
}
C $ run test
2 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 0 bytes still allocated
3 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 56 bytes still allocated
3 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 24 bytes still allocated
3 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 24 bytes still allocated
4 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 80 bytes still allocated
4 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 48 bytes still allocated
4 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 48 bytes still allocated
5 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 104 bytes still allocated
5 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 72 bytes still allocated
5 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 72 bytes still allocated
6 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 128 bytes still allocated
6 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 96 bytes still allocated
6 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 96 bytes still allocated
7 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 152 bytes still allocated
7 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 120 bytes still allocated
7 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 120 bytes still allocated
8 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 176 bytes still allocated
8 calls to LIB$GET_VM, 0 calls to LIB$FREE_VM, 144 bytes still allocated
...
|