typedef struct _LOSSection LOSSection;
struct _LOSSection {
LOSSection *next;
- int num_free_chunks;
+ size_t num_free_chunks;
unsigned char *free_chunk_map;
};
static void
add_free_chunk (LOSFreeChunks *free_chunks, size_t size)
{
- int num_chunks = size >> LOS_CHUNK_BITS;
+ size_t num_chunks = size >> LOS_CHUNK_BITS;
free_chunks->size = size;
{
LOSFreeChunks *free_chunks = NULL;
LOSSection *section;
- int num_chunks, i, start_index;
+ size_t i, num_chunks, start_index;
+
g_assert ((size & (LOS_CHUNK_SIZE - 1)) == 0);
{
LOSSection *section;
LOSFreeChunks *free_chunks;
- int num_chunks;
+ size_t num_chunks;
size += LOS_CHUNK_SIZE - 1;
size &= ~(LOS_CHUNK_SIZE - 1);
if (num_chunks >= LOS_NUM_FAST_SIZES) {
free_chunks = get_from_size_list (&los_fast_free_lists [0], size);
} else {
- int i;
+ size_t i;
for (i = num_chunks; i < LOS_NUM_FAST_SIZES; ++i) {
free_chunks = get_from_size_list (&los_fast_free_lists [i], size);
if (free_chunks)
free_los_section_memory (LOSObject *obj, size_t size)
{
LOSSection *section = LOS_SECTION_FOR_OBJ (obj);
- int num_chunks, i, start_index;
+ size_t num_chunks, i, start_index;
size += LOS_CHUNK_SIZE - 1;
size &= ~(LOS_CHUNK_SIZE - 1);