[mnet-devel] memory allocation of fecmodule measured

Zooko zooko at zooko.com
Wed Jul 23 22:12:20 BST 2003


I commented-out all the calls to Py_DECREF(), Py_XDECREF(), free(), and 
fec_free() in fecmodule.c, then ran fectest.py on files of different sizes.

I also checked with valgrind to see if the allocations made sense.

They do -- fecmodule allocates a little more than twice as much RAM as the 
size of the file it is encoding.  (Note: hopefully it also de-allocated most 
of that ASAP.  I'll test that next.)

Here are some stats:

size:        1, ram:   8744960, ram per byte of file: 8744960.00
size:        2, ram:   8744960, ram per byte of file: 4372480.00
size:        4, ram:   8740864, ram per byte of file: 2185216.00
size:        8, ram:   8744960, ram per byte of file: 1093120.00
size:       16, ram:   8744960, ram per byte of file: 546560.00
size:       32, ram:   8744960, ram per byte of file: 273280.00
size:       64, ram:   8744960, ram per byte of file: 136640.00
size:      128, ram:   8740864, ram per byte of file: 68288.00
size:      256, ram:   8744960, ram per byte of file: 34160.00
size:      512, ram:   8744960, ram per byte of file: 17080.00
size:     1024, ram:   8744960, ram per byte of file: 8540.00
size:     2048, ram:   8744960, ram per byte of file: 4270.00
size:     4096, ram:   8744960, ram per byte of file: 2135.00
size:     8192, ram:   8744960, ram per byte of file: 1067.50
size:    16384, ram:   8757248, ram per byte of file: 534.50
size:    32768, ram:   8769536, ram per byte of file: 267.62
size:    65536, ram:   8806400, ram per byte of file: 134.38
size:   131072, ram:   8871936, ram per byte of file: 67.69
size:   262144, ram:   9003008, ram per byte of file: 34.34
size:   524288, ram:   9265152, ram per byte of file: 17.67
size:  1048576, ram:   9789440, ram per byte of file: 9.34
size:  2097152, ram:  10838016, ram per byte of file: 5.17
size:  4194304, ram:  15032320, ram per byte of file: 3.58
size:  8388608, ram:  23433216, ram per byte of file: 2.79
size: 16777216, ram:  40226816, ram per byte of file: 2.40
size: 33554432, ram:  73809920, ram per byte of file: 2.20
size: 67108864, ram: 140992512, ram per byte of file: 2.10




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
mnet-devel mailing list
mnet-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mnet-devel




More information about the Mnet-devel mailing list