Home AMX User Forum AMXForums Archive Threads AMX Hardware

Strange Error in diagnostics CHeap::New - Insufficient memory for alloc!

Some times when I reboot an NI3000 that I'm re-programming for a client the NI crashes flooding diagnostics with the message below.

(0000192435) CHeap::New - Insufficient memory for alloc! Task=tInterpreter)
(0000192440) CHeap::New - Error (Task=tInterpreter)
(0000192444) RunCode - DevUnion Allocation failed

If anyone can shed some light on this message that would be great.

NI Firmware 3.0.453

mem
The largest free block of memory is 179088 bytes.

Comments

  • pdabrowskipdabrowski Posts: 184
    if you can (before it crashes) instead of using the simple MEM command, run SHOW MEM to see all of the memory types, also what is the DUET allocation set to, you may have a instance where there is too much duet allocated taking away from the main working memory.
  • DHawthorneDHawthorne Posts: 4,584
    Chances are you are out of non-volatile memory. For some reason, AMX defaults variables that are not specified to non-volatile on definition, and there is far less non-volatile memory available than volatile. So, it's my habit (since getting burned badly by this), to specifically declare every variable VOLATILE unless it needs to be otherwise. It's especially pertinent in modules that you may have multiple instances running at the same time in the same code. They can eat up your memory in no time.
  • John NagyJohn Nagy Posts: 1,742
    The non-volatile concept would more likely be a clue if this issue didn't come and go, with the same code, from boot to boot.

    We see it occasionally on a boot, even on older systems running code that worked for years, and another reboot typically corrects it with no changes of any kind.

    AMX hasn't been able to help.
  • syslocksyslock Posts: 45
    Thanks for the suggestions.

    I always specify variables as volatile, I've also removed the one duet module I was using and cooked my own and set duet memory from 8M to 4M. So we will see if any of this helps thanks.

    >get duet memory

    Duet Memory: 4M

    >show mem
    Display Memory
    Volatile Free : 4366980/33554432 (largest free block in bytes/max physical)
    NonVolatile Free: 1030250/1047536 (bytes free/max physical)
    Disk Free : 19912704/31954944 (bytes of free space/max physical)
    Duet Memory Free : 1193032 (bytes)
    Partition 1 - 1193032 (bytes)
    Total Collections - 4
    Average Time Between Collections - 5667ms
    Partition 2 - <UNKNOWN>
Sign In or Register to comment.