File: dxall1060

package info (click to toggle)
dx 1%3A4.4.0-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 51,684 kB
  • ctags: 48,796
  • sloc: ansic: 365,033; cpp: 156,603; sh: 13,395; java: 10,374; makefile: 2,377; awk: 444; yacc: 327; cs: 49
file content (32 lines) | stat: -rw-r--r-- 2,253 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!F-adobe-helvetica-medium-r-normal--18*
#!N 
#!CNavyBlue #!N  #!Rmeml Memory Leaks #!N #!EC #!N #!N A 
memory leak will occur if the memory allocated by a module 
is not freed before that module returns its output(s). (See  #!Lmemalc,dxall1024 h Allocating and Freeing Memory  #!EL  
for a list of Objects that typically need freeing.) Typically, if 
there is a memory leak, Data Explorer runs for some time. 
Then, after allocating all available memory, it stops executing and generates 
an error message that it is out of memory. It can 
resume execution only after the server has been disconnected and restarted. 
#!N #!N You can check a module for a memory leak 
by running it several times, together with the Usage module. If 
the memory managed by the executive is flushed after each execution, 
memory that is allocated by a module and not freed before 
returning will cause the Usage module to report an increase in 
memory. The following Data Explorer script checks for a leak: #!CForestGreen 
#!N #!N  #!F-adobe-courier-bold-r-normal--18*   #!N macro showleak() #!N { #!N output = 
YourModule(input, ...); #!N Print(output); #!N } #!N . . . #!N 
(any modules necessary to produce input for your module) #!N . 
. . #!N #!N showleak(); #!N showleak(); #!N Executive( "flush cache"); 
#!N Usage( "memory," 0) #!N showleak(); #!N Executive( "flush cache"); #!N 
Usage( "memory," 0) #!N showleak(); #!N Executive( "flush cache"); #!N Usage( 
"memory," 0) #!EF #!N #!N #!EC #!N #!N Each call to 
Usage prints out the amount of memory used in both the 
small and the large arena. Unless there is a memory leak 
in the module, these amounts will remain constant. #!N Note: It 
is important to run the executable in "readahead off" mode. The 
amounts reported by Usage will be distorted if the Data Explorer 
executive reads the script ahead of execution. Specify: #!CForestGreen #!N #!N 
 #!F-adobe-courier-bold-r-normal--18*   #!N dx -exec  #!F-adobe-times-bold-i-normal--18*   your_directory/your_executable #!EF -readahead off -script #!EF 
#!N #!N #!EC #!N #!N #!N #!N  #!F-adobe-times-medium-i-normal--18*   Next Topic #!EF 
#!N #!N  #!Ldatachp,dxall1061 h Working with Data Model Objects  #!EL  #!N  #!F-adobe-times-medium-i-normal--18*   #!N