this problem occurs when i delete old thread(needless) and create new thread.
i wanted to additional features, so i create a new thread.
but my code is out of memory.
so i thought deleting the deprecated threads and creating a new thread would solve the problem.
but new thread address does not enter an address previously deleted.
assign to next address. so, when creating use to ‘new’ operator, out of memory.
HOST *pgHost = new HOST();
HOST::HOST() : :
SerialPipe(HOST_TX, HOST_RX, 115200, gHostRxBuff, sizeof(gHostRxBuff), 0, gHostTxBuff, sizeof(gHostTxBuff)), _daemon(NULL)
_debug_trace_on = false;
_daemon = new Thread(osPriorityNormal, OS_STACK_SIZE * 2, NULL, “host”);
rmc_timestamp = 0;
like the example above, i create a thread.
Delete unnecessary threads through ‘if’ operator, and then create new thread.