[webkit-help] Modifications in FastMalloc.cpp to count memory

Anton Ebertzeder x47ru.x9090 at googlemail.com
Wed Sep 14 02:37:45 PDT 2011


Greetings,

this is my first post here, so I hope I made no mistakes. I also hope this
is the correct part of mailinglist.


I would like to use WebKit on an embedded system. For this I need to know
how much memory the WebKit-Browser needs, especially if JavaScript is used.
I know it depends on many things, the page I view and so on… I’m only
interested in a generell overview. To count the memory at all I simply added
a few lines of code to FastMalloc.cpp in source/JavaScriptCore/wtf
directory. I added a few lines of code to function


void* fastMalloc(size_t n) {…}


I simple write n to a global variable.


mem_counter_var += n;


In a next step I subtract frees. The debugging show me that function
fastMalloc is used permanently, but I can’t find my count variable with
debugger. I also tried to simple printf the variable each time, but it also
won’t give any result. In my opinion the modifications are not made. I guess
that WebKit just copy some files and doesn’t compile the FastMalloc.cpp with
my modifications


 My Question is now: Does anyone know how to (re)compile WebKit in such a
way that my modifications to be considered?


Hope anybody can help :)


Regards,

X47ru.x9090


P.S. Sorry for my bad English
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20110914/0ee3313c/attachment.html>


More information about the webkit-help mailing list