summaryrefslogtreecommitdiff
path: root/shared/sis_ds.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared/sis_ds.c')
-rw-r--r--shared/sis_ds.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/shared/sis_ds.c b/shared/sis_ds.c
index 08391554..60bffa69 100644
--- a/shared/sis_ds.c
+++ b/shared/sis_ds.c
@@ -28,7 +28,6 @@
*
*/
-#include "sis.h"
#include "drmP.h"
#include "drm.h"
#include "sis_ds.h"
@@ -42,7 +41,7 @@ set_t *setInit(void)
int i;
set_t *set;
- set = (set_t *)DRM(alloc)(sizeof(set_t), DRM_MEM_DRIVER);
+ set = (set_t *)drm_alloc(sizeof(set_t), DRM_MEM_DRIVER);
if (set != NULL) {
for (i = 0; i < SET_SIZE; i++) {
set->list[i].free_next = i + 1;
@@ -128,7 +127,7 @@ int setNext(set_t *set, ITEM_TYPE *item)
int setDestroy(set_t *set)
{
- DRM(free)(set, sizeof(set_t), DRM_MEM_DRIVER);
+ drm_free(set, sizeof(set_t), DRM_MEM_DRIVER);
return 1;
}
@@ -167,7 +166,7 @@ memHeap_t *mmInit(int ofs,
if (size <= 0)
return NULL;
- blocks = (TMemBlock *)DRM(calloc)(1, sizeof(TMemBlock), DRM_MEM_DRIVER);
+ blocks = (TMemBlock *)drm_calloc(1, sizeof(TMemBlock), DRM_MEM_DRIVER);
if (blocks != NULL) {
blocks->ofs = ofs;
blocks->size = size;
@@ -202,7 +201,7 @@ memHeap_t *mmAddRange( memHeap_t *heap,
int size )
{
PMemBlock blocks;
- blocks = (TMemBlock *)DRM(calloc)(2, sizeof(TMemBlock), DRM_MEM_DRIVER);
+ blocks = (TMemBlock *)drm_calloc(2, sizeof(TMemBlock), DRM_MEM_DRIVER);
if (blocks != NULL) {
blocks[0].size = size;
blocks[0].free = 1;
@@ -229,7 +228,7 @@ static TMemBlock* SliceBlock(TMemBlock *p,
/* break left */
if (startofs > p->ofs) {
- newblock = (TMemBlock*) DRM(calloc)(1, sizeof(TMemBlock),
+ newblock = (TMemBlock*) drm_calloc(1, sizeof(TMemBlock),
DRM_MEM_DRIVER);
newblock->ofs = startofs;
newblock->size = p->size - (startofs - p->ofs);
@@ -242,7 +241,7 @@ static TMemBlock* SliceBlock(TMemBlock *p,
/* break right */
if (size < p->size) {
- newblock = (TMemBlock*) DRM(calloc)(1, sizeof(TMemBlock),
+ newblock = (TMemBlock*) drm_calloc(1, sizeof(TMemBlock),
DRM_MEM_DRIVER);
newblock->ofs = startofs + size;
newblock->size = p->size - size;
@@ -295,7 +294,7 @@ static __inline__ int Join2Blocks(TMemBlock *p)
TMemBlock *q = p->next;
p->size += q->size;
p->next = q->next;
- DRM(free)(q, sizeof(TMemBlock), DRM_MEM_DRIVER);
+ drm_free(q, sizeof(TMemBlock), DRM_MEM_DRIVER);
return 1;
}
return 0;
@@ -380,7 +379,7 @@ void mmDestroy(memHeap_t *heap)
p = (TMemBlock *)heap;
while (p != NULL) {
q = p->next;
- DRM(free)(p, sizeof(TMemBlock), DRM_MEM_DRIVER);
+ drm_free(p, sizeof(TMemBlock), DRM_MEM_DRIVER);
p = q;
}
}