40 #define ASN_MEM_BLOCK 0x100 74 if (current_blk->
next == NULL)
78 if (new_block != NULL)
81 current_blk->
next = new_block;
82 TRACE(TMEMORY, (
"new_blk=%p", new_block))
89 current_blk = current_blk->
next;
93 newItem = &(current_blk->
items[current_blk->
count]);
112 temp_block = first_block;
114 while (temp_block != current_blk)
116 TRACE(TMEMORY, (
"temp_blk=%p, cnt=%d, chk=%d", temp_block, temp_block->
count, temp_block->
check))
127 temp_block->
count = 0;
128 temp_block->
check = 0;
129 temp_block = temp_block->
next;
132 for (i = 0; i != temp_block->
count; i++)
142 TRACE(TMEMORY, (
"temp_blk=%p, cnt=%d, chk=%d", temp_block, temp_block->
count, temp_block->
check))
143 temp_block->
count = 0;
144 temp_block->
check = 0;
145 current_blk = temp_block;
146 temp_block = temp_block->
next;
147 while (temp_block != NULL)
149 if (temp_block->
check != 8)
151 TRACE(TMEMORY, (
"temp_blk=%p chk=%d", temp_block, temp_block->
check))
153 current_blk = temp_block;
154 temp_block = temp_block->
next;
158 TRACE(TMEMORY, (
"free blk=%p", temp_block))
159 if (current_blk->
next == temp_block)
161 current_blk->
next = NULL;
163 current_blk = temp_block->
next;
165 temp_block = current_blk;
168 current_blk = first_block;
183 if (nextComp != NULL)
193 nextComp = nextComp->
next;
198 firstComp->
next = NULL;
212 while (firstComp != NULL)
222 assert( first_block == NULL );
224 if (first_block != NULL)
228 current_blk = first_block;
229 TRACE(TMEMORY, (
"first_blk=%p", first_block))
230 return (first_block == NULL) ? 0 : 1;
236 temp_block = first_block;
237 while (temp_block != NULL)
239 current_blk = temp_block->
next;
241 temp_block = current_blk;
fpa1_syntaxList * fpa1_getTagItem(void)
int fpa1_delList(fpa1_syntaxList *firstComp)
struct fpa1_synBlock * next
fpa1_syntaxList * fpa1_delFirstItem(fpa1_syntaxList *firstComp)
fpa1_syntaxList * fpa1_synFreeFirstItem(fpa1_syntaxList *)
Contains functions/structure used to do MHEG-5 ASN.1 syntax parsing.
Typedefs, macros used by all of parser. These may be duplicated elsewhere.
struct fpa1_syntaxItem * children
Contains macros for MHEG-5 ASN.1 tags and structures.
int fpa1_freeUnusedData(void)
void STR_DataFree(unsigned char *data, unsigned int size)
syntax item block manager Contains functions to create a mini memory manager for allocating syntax li...
fpa1_syntaxList items[ASN_MEM_BLOCK]
Mheg5 logging and debug printing.
Contains memory management functions.
struct fpa1_syntaxItem * next