cancel
Showing results for 
Search instead for 
Did you mean: 

Extract datasource consume a large number of memory

Former Member
0 Kudos

Hi, experts,

I function enhance a datasource, call a function module in exit.

originally, extract data consume a large number of memory, now, call the FM, need more.

use SM66 to monitor, after the FM finish, the memory isnt released, I think it should be released. because all variables is local in the FM.

I want to know why memory isnt released and where memory is consumed

then create memory snapshot before and after call FM via /HMUSA in debug,

then, compare memory snapshot via S_MEMORY_INSPECTOR, but find nothing related to my program

anybody could tell how to solve it and how to use S_MEMORY_INSPECTOR, many tks.

Best regards.

Accepted Solutions (1)

Accepted Solutions (1)

former_member197561
Active Participant
0 Kudos

Hi J.D.,

If you use internal ABAP tables, use explicitly "free".

Basically on

  • CLEAR, REFRESH
    The first memory page is kept
    All indexes are dropped

  • FREE
    The table body is de-allocated completely
    All indexes are dropped
    The table header is not de-allocated but inserted to a free list

Best regards,

Sylvia

Former Member
0 Kudos

Tks Sylvia,

I already clear all variables via FREE command in FM.

Best regards.

former_member197561
Active Participant
0 Kudos

Hi J.D.

In /nSM66 how high is the "Heap Memory" and how high is the "Ext.mem."?

Could you cross check with the data "Memory Used [kb]" displayed in /nSTAD for same request?

Best regards,

Sylvia

Former Member
0 Kudos

appreciate Sylvia reply.

as i know, SM66 and STAD can only know total memory consumption,

i want to know after FM release, what object consume the released memory.

Best regards.

former_member197561
Active Participant
0 Kudos

Hi J.D.,

I am a bit confused. Actually you would not be able to see "what object consume the released memory" .. Only objects which are still alive are seen in the Memory Snapshot.

I assume you need something like "allocation trace" to see what is being allocated, before it was released, but I am not aware of such tool for ABAP.

Best regards,

Sylvia

Former Member
0 Kudos

Hi Sylvia,

you are right, so, i save memory snapshot via call command /HMUSA in debug before and after call FM.

Then call Tcode S_MEMORY_INSPECTOR to compare them, exceeded memory is displayed in red color.

but to be surprise, all red objects are standard. i cant find out z-object or global internal table related to my datasource, for example C_T_DATA etc.

you or anybody else could give me a demo of using S_MEMORY_INSPECTOR, tks a lot.

i will do a test again.

best regards.


former_member197561
Active Participant

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi All,

I do a test scenario.http://scn.sap.com/thread/3332325

Former Member
0 Kudos

Why you decide that memory is not released? Where you check this?

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

many tks Sylvia,

I will read these links. then do a more detail test and feedback the result.

Best regards.

J.D

Former Member
0 Kudos

help pls, tks