This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DSPBIOS dynamic memory allocation

Other Parts Discussed in Thread: SYSBIOS

I have some questions regarding how DSPBIOS uses dynamic memory allocation (i.e. malloc() )

  1. Is it possible to know exactly for which processes a malloc() is called?
  2. Can we assume that malloc() is only used when XXX_create() functions are called (i.e. tasks, locks, and sema creations)
  3. Is malloc() used by the O/S for internal processes not triggered by an application call to the DSPBIOS API?
  4. Is there any protection for failures in the dynamic memory allocation
  5. Is there any chance to get the DSPBIOS source code?
  • Can you specify what version of DSPBIOS you are on?  Here is a description of how DSPBIOS uses malloc:

    Software modules in DSP/BIOS that allocate storage at run-time use MEM functions; DSP/BIOS does not use the standard C function malloc. DSP/BIOS modules use MEM to allocate storage in the segment selected for that module with Tconf. The MEM Manager property, Segment for malloc()/free(), is used to implement the standard C malloc, free, and calloc functions. These functions actually use the MEM functions (with segid = Segment for malloc/free) to allocate and free memory.

    1.  No, do not think that's possible.

    2.  BIOS uses MEM_alloc by default for XXX_create().

    3.  malloc is not used by the O/S for internal processes

    4.  A failed allocation should return "NULL".  Other than that, I don't believe there is any protection.

    5.  I do not think you can get the DSPBIOS source code.  SYSBIOS - which is BIOS 6.x ships with source code.  So you might consider moving to SYSBIOS if you need source code.

     

  • Hello, thanks for the reply.

    We are using DSPBIOS 5.41.02.14.