in reply to memory penalty for loading XS modules?

without seeing your code, we can not really help you...

anyway, Devel::Size doesn't take into account memory consummed by non-perl structures.

Are you compiling the C module with debugging information, doing so can add a lot of "rubbish" to the library... though usually no so much!

Check that you are passing the right size to the perl memory functions and macros, their argument types and order are inusual and passing the wrong arguments is not so rare!

  • Comment on Re: memory penalty for loading XS modules?

Replies are listed 'Best First'.
Re^2: memory penalty for loading XS modules?
by lestrrat (Deacon) on Jul 12, 2005 at 13:09 UTC

    Sheesh, part of it was the stupid -ggdb flag. Still there's a 10 MB penalty.

    PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE + VSIZE 17233 perl 0.0% 0:03.03 1 12 46 13.2M 1.42M 14.4M + 33.3M 17232 perl 0.0% 0:05.40 1 12 1176 14.1M 7.79M 20.2M + 43.8M

    Still experimenting...