AnsweredAssumed Answered

Using _RTCS_mem_pool for memory allocation

Question asked by jschepler on Aug 23, 2018
Latest reply on Aug 23, 2018 by jschepler



I have MRAM attached to the flexbus that I would like to use for RTCS.  I have been running the task successfully by using the following:

_RTCS_mem_pool = _mem_create_pool(RTCS_mem_location, MRAM_POOL_SIZE);

Now, in my cgi function I would like to allocate memory inside the _RTCS_mem_pool to avoid using the internal RAM of the processor, so I do the following:

/* Read back the data sent from the webpage */
  req_len = (param->content_length) + 1;

  req_buffer = _mem_alloc_system_from(_RTCS_mem_pool, sizeof(char)*req_len);

  if(req_buffer != NULL)
    read_len = HTTPSRV_cgi_read(param->ses_handle, req_buffer, req_len);

I successfully point to a location in the _RTCS_mem_pool, but the call to HTTPSRV_cgi_read never returns.  Am I allowed to use the _RTCS_mem_pool for my own allocations?