|
@@ -59,4 +59,24 @@ static inline void * erealloc ( void *ptr, size_t size, unsigned int align ) {
|
59
|
59
|
return emalloc ( size, align );
|
60
|
60
|
}
|
61
|
61
|
|
|
62
|
+/*
|
|
63
|
+ * Legacy API calls
|
|
64
|
+ *
|
|
65
|
+ */
|
|
66
|
+static inline void * allot ( size_t size ) {
|
|
67
|
+ return emalloc ( size, sizeof ( void * ) );
|
|
68
|
+}
|
|
69
|
+
|
|
70
|
+static inline void forget ( void *ptr ) {
|
|
71
|
+ efree ( ptr );
|
|
72
|
+}
|
|
73
|
+
|
|
74
|
+static inline void * allot2 ( size_t size, uint32_t mask ) {
|
|
75
|
+ return emalloc ( size, mask + 1 );
|
|
76
|
+}
|
|
77
|
+
|
|
78
|
+static inline void forget2 ( void *ptr ) {
|
|
79
|
+ efree ( ptr );
|
|
80
|
+}
|
|
81
|
+
|
62
|
82
|
#endif /* HEAP_H */
|