

/* $Id: stdlib_private.h 1657 2008-03-24 17:11:08Z arcanum $ */

#include <inttypes.h>
#include <stdlib.h>
#include <avr/io.h>

#if !defined(__DOXYGEN__)

struct __freelist {
	size_t sz;
	struct __freelist *nx;
};

#endif

extern char *__brkval;		/* first location not yet allocated */
extern struct __freelist *__flp; /* freelist pointer (head of freelist) */
extern size_t __malloc_margin;	/* user-changeable before the first malloc() */
extern char *__malloc_heap_start;
extern char *__malloc_heap_end;

extern char __heap_start;
extern char __heap_end;

/* Needed for definition of AVR_STACK_POINTER_REG. */
#include <avr/io.h>

#define STACK_POINTER() ((char *)AVR_STACK_POINTER_REG)

