Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use libc from newlib #1752

Merged
merged 6 commits into from
Jun 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions cores/esp8266/heap.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@
#include <stdlib.h>
#include "umm_malloc/umm_malloc.h"
#include <c_types.h>
#include <sys/reent.h>

void* _malloc_r(struct _reent* unused, size_t size)
{
return malloc(size);
}

void _free_r(struct _reent* unused, void* ptr)
{
return free(ptr);
}

void* _realloc_r(struct _reent* unused, void* ptr, size_t size)
{
return realloc(ptr, size);
}

void* _calloc_r(struct _reent* unused, size_t count, size_t size)
{
return calloc(count, size);
}

void* ICACHE_RAM_ATTR pvPortMalloc(size_t size, const char* file, int line)
{
Expand Down
Loading