celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Quartier" <thomas.quart...@student.kuleuven.be>
Subject RE: APR memory dealocation when bundle stops
Date Fri, 11 Apr 2014 11:03:15 GMT
Hi,

Hi, until yesterday, I only measured the memory with memstat (measuring the
virtual memory size). I also did the test on an x86 system and the result is
the same.

When I stop a bundle and start it again, the memory doesn't grow. The pool
is reused.

I now also measured the physical memory used by celix and the result is
better, memory gets allocated when a bundle starts and a part of that is
deallocated when a bundles stops. There is a part of the physical memory
that doesn't return to the operating system when a bundle stops.
Below is the output of the free command (used memory in kB) when I start and
stop 10 identical bundles on an ARM board.

Watch -n 1 'free >> memory.txt'

7800
7784
7784
7800
7800
7800
7800
7800
9076 --> start Celix framework
9076
9076
9076
9060
9060
9060
9060
9060
9060
9060
9072
9072
9072
9072
9072
9072
9520 --> start 10 bundles
9624
9612
9612
9612
9612
9612
9624
9624
9624
9624
9608
9608
9608
9608
9608
9608
9608
9608
9608
9608
9608
9608
9608
9620
9620
9620
9620
9620
9620
9620
9620
9620
9620
9620
9620
9620
9620
9620
9620
9620
9620
9636
9636
9636
9636
9636
9636
9636
9620
9620
9620
9620
9620
9620
9620
9620
9620
9620
9620
9620
9620
9620
9632
9632
9632
9632
9632
9632
9632
9632
9632
9632
9632
9632
9632
9644
9644
9660
9660
9660
9660
9660
9660
9644
9636
9616
9600
9572
9532
9480 --> stop 10 bundles
9480
9480
9480
9480
9480
9480
9480
9480
9480
9480
9480
9480
9480
9480
9480
9480
9496
9496
9496
9496
9496
9480
9480
9480
9480
9480
9480
9480
9480
9480
9480
9480
9480
9480
9480
9480
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9508
9508
9508
9508
9508
9508
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9492
9504
9520
9520
9520
9520
9520
9520
9520
9504
9504
9504
9504
9504
9504
9504
9504
9504
9504
9504
9504
9504
9504
9504
9504
9504
9504
9504
9504
9504
9504
9504
9520
9520
9520
9520
9504
9504
9504
9516
9516
9516
9516
9516
9516
9516
9516
9516
9516
9536
9536
9512
7928 --> stop Celix framework
7928
7928
7916
7916
7916
7916
7916 

Kind regards,
Thomas





Mime
View raw message