Print Thread
TOracleSession memory usage
#37167 02/02/10 11:00 PM
Joined: Jun 2003
Posts: 36
Bolzano, Italy
Member
OP Offline
Member
Joined: Jun 2003
Posts: 36
Bolzano, Italy
D2009, DOA 4.1.2
A simple program with an empty form with a TOracleSession component.
Running the program the task manager shows a memory usage of about 4 MB. Calling the Logon method, after the database connection is established the memory consumption jumps to 14 MB. Closing the session doesn't release the memory.
Is this memory usage normal ?

Sergio 7

Re: TOracleSession memory usage
sergio.sette #37175 02/03/10 10:56 AM
Joined: Aug 1999
Posts: 22,219
Member
Offline
Member
Joined: Aug 1999
Posts: 22,219
The first logon will load the Oracle Call Interface libraries and will initialize the Oracle environment. This can indeed allocate 10MB. When the session is logged off this memory is indeed not freed: the libraries remain loaded, and the Oracle environment will persist.


Marco Kalter
Allround Automations
Re: TOracleSession memory usage
Marco Kalter #37182 02/03/10 11:34 AM
Joined: Apr 2009
Posts: 8
C
Member
Offline
Member
C
Joined: Apr 2009
Posts: 8
Tnx Marco,

is there a way to unload the OCI ? I'm writing a small tray icon application that should be as smart as possible.

s7

Re: TOracleSession memory usage
ced bz #37195 02/04/10 10:19 AM
Joined: Aug 1999
Posts: 22,219
Member
Offline
Member
Joined: Aug 1999
Posts: 22,219
After disconnecting and/or freeing all TOracleSession instances, you can call DLLExit from the OracleCI unit. This will free the Oracle Environment and will unload the libraries.


Marco Kalter
Allround Automations
Re: TOracleSession memory usage
Marco Kalter #37219 02/05/10 02:19 PM
Joined: Apr 2009
Posts: 8
C
Member
Offline
Member
C
Joined: Apr 2009
Posts: 8
I've tried but the Task manager reports the same memory usage for my process

s7

Re: TOracleSession memory usage
ced bz #37225 02/08/10 10:39 AM
Joined: Aug 1999
Posts: 22,219
Member
Offline
Member
Joined: Aug 1999
Posts: 22,219
Maybe the process memory is not immediately freed when unloading the library. That's all you can you though.


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.127s Queries: 15 (0.074s) Memory: 2.5181 MB (Peak: 3.0405 MB) Data Comp: Off Server Time: 2024-05-16 04:23:48 UTC
Valid HTML 5 and Valid CSS