I wish I knew how to be clear why the fault occured: The problem seems to occur in libperl.a and I stronlgly suspect it's when it calls perl_alloc().

I'll initially rule out memory leaks since my test app currently does nothing other than instantiate and invoke perl.

Insufficient memory strikes a chord. I currently have a 2GB micro SD card which was initially pretty empty when I successfully ran my app. Since then I installed loads of things and almost filled the SD card (I have about 200MB left), so I certainly have much less disk space now than I had before.

My confusion is this: I am low on disk space, not ram. As far as I know perl_alloc() requires ram and not SD card space so I can't see how low SD card space would cause a problem.
I ran 'top' to see if any other processes were hogging ram but almost all of the ram seems to be available.
I do think you're onto something here with the hole "freeing up space" but I don't understand why. Besides, 200MB is still a lot of disk space for one app.

I can't delete much on the SD card, plus I'm afraid of deleting the wrong thing. As a stab in the dark, I'll go get a 16GB card from the supermarket and try again. Is this what you had in mind or did you mean freeing up memory some other way?


In reply to Re^3: perlembed segmentation fault by 4Xsake
in thread perlembed segmentation fault by 4Xsake

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.