Skip to content
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (41 sloc) 2.5 KB
_HEADER_HL1(`13-Jul-2008: malloc() comments')
<p>It is clever idea used in Oracle RDBMS, where, in complex memory control environment, there are a presence of different <a href="">malloc()</a>-like functions.</p>
<p>Major portion of these malloc()-like functions also have comment-parameter, where caller pass short human-readable parameter, describing, for what this memory will be used.</p>
<p>After that, at any point of program execution, it is possible to see statistics, what are major memory consumers.</p>
<p>Also, in case of memory leakage, it is possible to see, what memory were not freed.</p>
<p>In Oracle RDBMS, if memory is allocated in <a href="">SGA</a> area, statistics can be seen using <a href="">V$SGASTAT</a> view.</p>
<p>For example:</p>
SQL> select * from v$sgastat order by bytes desc;
------------ -------------------------- ----------
shared pool free memory 78190408
buffer_cache 20971520
shared pool sql area 4756932
java pool free memory 4194304
large pool free memory 3988096
shared pool KCB Table Scan Buffer 3981204
shared pool KSFD SGA I/O b 3977140
shared pool row cache 3755444
shared pool library cache 3266232
log_buffer 2904064
shared pool kglsim hash table bkts 2097152
------------ -------------------------- ----------
shared pool ASH buffers 2097152
shared pool PL/SQL MPCODE 2046600
shared pool KGLS heap 1654696
shared pool event statistics per sess 1566720
shared pool CCursor 1438520
fixed_sga 1289508
shared pool PL/SQL DIANA 1282072
shared pool KTI-UNDO 1235304
shared pool private strands 1198080
shared pool KSXR receive buffers 1034000
shared pool KQR M PO 979968
Windows NT has something similar: <a href="">ExAllocatePoolWithTag</a></p>
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.