On 10/14/2010 12:18 PM, Enlightenment SVN wrote:
> The code below is an example on which valgrind wouldn't complain without
> this
> patch:
>
> @code
> #include<Eina.h>
>
> int
> main(int argc, char *argv[])
> {
> int i, *pool[4];
> Eina_Mempool *mp;
>
> eina_init();
> mp = eina_mempool_add("chained_mempool", "test", NULL, sizeof(int), 4);
>
> for (i = 0; i< 4; i++) {
> pool[i] = eina_mempool_malloc(mp, sizeof(int));
> *pool[i] = i;
> }
>
> printf("Valid mp pointer: pool[0] = %d\n", *pool[0]);
> eina_mempool_free(mp, pool[0]);
> printf("Freed mp pointer: pool[0] = %d\n", *pool[0]);
>
> for (i = 1; i< 4; i++)
> eina_mempool_free(mp, pool[i]);
>
> eina_mempool_del(mp);
> eina_shutdown();
>
> return 0;
> }
> @endcode
When running that example code we get some warnings besides the one
about invalid access as seen in http://pastebin.ca/1962169.
I would appreciate it if someone could certify whether I am doing
something wrong. cedric? ;)
BR.
--
Rafael Fonseca
ProFUSION embedded systems
http://www.profusion.mobi
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel