[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] mem_malloc()
From: |
Aidan Hammel |
Subject: |
[lwip-users] mem_malloc() |
Date: |
Mon, 6 Dec 2004 11:40:04 -0000 |
Hi,
I'm running lwip on a single threaded (no
OS) system. I'd like to allocate some
memory to store some received data with something like:
u8_t *ptr_data;
ptr_data = malloc(data_len *
sizeof(u8_t));
malloc seems quite happy to allocate more
memory than is available, leading to
crashes. I'm guessing I need to use mem_alloc (in mem.c). However
simply substituting malloc for mem_alloc leaves prt_data as NULL.
Can anybody see what I'm doing wrong? Is mem_malloc the right function or does it do
something completely different?
Thanks,
Aidan
- [lwip-users] mem_malloc(),
Aidan Hammel <=