update memory

This commit is contained in:
hathach committed 2018-01-11 23:36:17 +07:00
1 parent b2934caba7
commit fd41ae543c
1 file changed
+5 -2
+5 -2
View File
@@ -167,7 +167,6 @@ void srp_init(void)
mpi_free(&x);
memory_buffer_alloc_free();
rtos_free(memory);
}
@@ -183,7 +182,10 @@ uint8_t srp_setA(uint8_t* abuf, uint16_t length, moretime_t moretime)
// The MPI library uses a ridiculous amount of memory. We use the stack allocator
// so we don't tie this memory up except when we absolutely need to.
uint8_t memory[11 * 1024];
// uint8_t memory[11 * 1024];
uint8_t* memory = (uint8_t*) rtos_malloc(11*1024);
VERIFY(memory, NRF_ERROR_NO_MEM);
memory_buffer_alloc_init(memory, sizeof(memory));
// getK
@@ -260,6 +262,7 @@ uint8_t srp_setA(uint8_t* abuf, uint16_t length, moretime_t moretime)
}
memory_buffer_alloc_free();
rtos_free(memory);
// getM1 - username s abuf srp.B K
{