aboutsummaryrefslogtreecommitdiff
path: root/shared-core/sis_ds.c
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2004-09-27 19:51:38 +0000
committerJon Smirl <jonsmirl@yahoo.com>2004-09-27 19:51:38 +0000
commitfa6b1d129e7bf8acf41e66c9c665ae9f9c1d5b0d (patch)
treec0b8605f134c4fe96a78f5b30644d25ac5ebcdf9 /shared-core/sis_ds.c
parent77fa7b9548bf7a5bf5e49515f1a478c27ede07a7 (diff)
First check in for DRM that splits core from personality modules
Diffstat (limited to 'shared-core/sis_ds.c')
-rw-r--r--shared-core/sis_ds.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/shared-core/sis_ds.c b/shared-core/sis_ds.c
index 08391554..60bffa69 100644
--- a/shared-core/sis_ds.c
+++ b/shared-core/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;
}
}