*** empty log message ***
This commit is contained in:
@ -4,7 +4,7 @@ OBJS = $(SRCS:.c=.obj)
|
||||
OUT = xpstx.lib
|
||||
|
||||
CC = c:\tc\tcc
|
||||
CFLAGS = -I..\.. -D_DOS -mh -w
|
||||
CFLAGS = -I..\.. -D_DOS -ml -w
|
||||
|
||||
all: $(OBJS)
|
||||
c:\tc\tlib $(OUT) @&&!
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: memory.c,v 1.10 2005-05-19 16:41:10 bacon Exp $
|
||||
* $Id: memory.c,v 1.11 2005-05-20 04:01:12 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <xp/stx/memory.h>
|
||||
@ -70,7 +70,11 @@ xp_stx_word_t xp_stx_memory_alloc (xp_stx_memory_t* mem, xp_stx_word_t nbytes)
|
||||
if (object == XP_NULL) {
|
||||
xp_stx_memory_gc (mem);
|
||||
object = (xp_stx_object_t*)xp_stx_malloc (nbytes);
|
||||
if (object == XP_NULL) return mem->capacity;
|
||||
/*if (object == XP_NULL) return mem->capacity;*/
|
||||
if (object == XP_NULL) {
|
||||
xp_stx_assert (XP_TEXT("MEMORY ALLOCATION ERROR\n") == XP_NULL);
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
|
||||
slot = mem->free;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: stx.h,v 1.15 2005-05-19 16:41:10 bacon Exp $
|
||||
* $Id: stx.h,v 1.16 2005-05-20 04:01:12 bacon Exp $
|
||||
*/
|
||||
|
||||
#ifndef _XP_STX_STX_H_
|
||||
@ -15,8 +15,10 @@ typedef xp_size_t xp_stx_size_t;
|
||||
typedef xp_size_t xp_stx_index_t;
|
||||
|
||||
typedef struct xp_stx_object_t xp_stx_object_t;
|
||||
/*
|
||||
typedef struct xp_stx_byte_object_t xp_stx_byte_object_t;
|
||||
typedef struct xp_stx_string_object_t xp_stx_string_object_t;
|
||||
*/
|
||||
typedef struct xp_stx_memory_t xp_stx_memory_t;
|
||||
typedef struct xp_stx_t xp_stx_t;
|
||||
|
||||
@ -107,6 +109,7 @@ struct xp_stx_t
|
||||
#define XP_STX_OBJECT(stx,idx) (((stx)->memory).slots[idx])
|
||||
#define XP_STX_CLASS(stx,idx) (XP_STX_OBJECT(stx,(idx))->class)
|
||||
#define XP_STX_ACCESS(stx,idx) (XP_STX_OBJECT(stx,(idx))->access)
|
||||
#define XP_STX_DATA(stx,idx) ((void*)(XP_STX_OBJECT(stx,idx) + 1))
|
||||
|
||||
#define XP_STX_TYPE(stx,idx) (XP_STX_ACCESS(stx,idx) & 0x03)
|
||||
#define XP_STX_SIZE(stx,idx) (XP_STX_ACCESS(stx,idx) >> 0x02)
|
||||
|
Reference in New Issue
Block a user