Sign in

username:

password:



Not a member?

Search adsp



Search tips

Subscribe to adsp



adsp by Keywords

AD1819 | AD7332 | ADSP-2106 | ADSP-21060 | ADSP-21065L | ADSP-2116 | ADSP-21160M | ADSP-2181 | ADSP-218x | ADSP-219 | ADSP-2199 | ADSP219 | BF531 | BF532 | BF533 | BF535 | Blackfin | FFT | JTAG | LDF | SDRAM | SHARC | SPORT | UART | VDSP++ | VisualDSP

Ads

Discussion Groups

Discussion Groups | Analog Devices DSPs | measuring heap usage

Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).

  

Post a new Thread

measuring heap usage - Murat Artun - Aug 9 8:55:40 2007



Hello,

Does anyone have any idea about how it would be possible to measure heap usage? For this
purpose, do we need to follow a statistical measurement approach?

Thanks
-- 
M u r a t    A r t u n, MSc.
    Design Engineer

"be conservative in what you do, be liberal in what you accept from others"
       
---------------------------------
Pinpoint customers who are looking for what you sell. 


(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: measuring heap usage - Andrew Nesterov - Aug 11 14:34:44 2007

Hi,

A simple approach is to create a mutex object with all the necessary
statistics, modify its instant/cumulative value fields each time a local
allocation/free occurs and based on these, calculate extremas, averages
and other moments (whatever is needed) once per a time unit.

     STRUCTURE HEAP_USAGE_MUTEX
     begin
        Heap_Size                 ; increment on alloc/ decrement on free
        Min_Heap_Size             ; update on each free
        Max_Heap_Size             ; update on each alloc
        Cumulative_Alloc_Size     ; init to 0, increment on alloc
        Cumulative_Free_Size      ; init to 0, increment on free
        No_of_Allocs              ; init to 0, increment on alloc
        No_of_Frees               ; init to 0, increment on free
        ...                       ; etc.
     end

Rgds,

Andrew

(andrew dot nesterov at techemail dot com)

> Subject: measuring heap usage
> Posted by: "Murat Artun" m...@yahoo.com muratartun
> Date: Thu Aug 9, 2007 5:55 am ((PDT))
>
> Hello,
>
> Does anyone have any idea about how it would be possible to measure heap 
> usage? For this purpose, do we need to follow a statistical measurement 
> approach?
>
> Thanks
> -- 
> M u r a t    A r t u n, MSc.
>    Design Engineer
>
> "be conservative in what you do, be liberal in what you accept from others"
>
> ---------------------------------
> Pinpoint customers who are looking for what you sell.



(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )