[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Issues] Propose to Use madvise API on Runtime Loader
- To: issues@xxxxxxxxxx
- Subject: [Issues] Propose to Use madvise API on Runtime Loader
- From: lin zuojian <manjian2006@xxxxxxxxx>
- Date: Thu, 22 May 2014 16:55:28 +0800
Hi,
I am trying to reduce the memory foot print of shared objects.After
examine the layouts of many shared objects, I find out that the start
part of a shared object will be seldom needed.
So I add the following code to the runtime loader:
madvice(si->base, si->rel + si->rel_count * 8, MADV_DONTNEED);
And Find out the foot print drops proportionally dramatically.
An very big shared object(libwebcore.so), drops from 7MB to 4MB.
So I think it's a good idea to add this technique to the future
eglibc.
madvice tell *nix system to let go the page table and the page in
the specify range. But not the vma.
--
Lin Zuojian
_______________________________________________
Issues mailing list
Issues@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/issues