18 lines
492 B
C
18 lines
492 B
C
#ifndef _PIUMA_PHYSICS_BASE_H_
|
|
#define _PIUMA_PHYSICS_BASE_H_
|
|
|
|
#include "../lib/memory.h"
|
|
|
|
/* Reassing phy_alloc and phy_free with your own alloc/free functions if you don't
|
|
* want to use malloc and free.
|
|
*/
|
|
extern alloc_t phy_alloc;
|
|
extern realloc_t phy_realloc;
|
|
extern free_t phy_free;
|
|
|
|
#define PHY_ALLOC(type, size) (type *)phy_alloc(sizeof(type) * size)
|
|
#define PHY_REALLOC(type, ptr, size) (type *)phy_realloc(ptr, sizeof(type) * size)
|
|
#define PHY_FREE(ptr) phy_free(ptr)
|
|
|
|
#endif
|