Add fb_free_all.

* Free all blocks allocated on fb ram
This commit is contained in:
iabdalkader 2016-02-20 17:41:21 +02:00
parent 84ff228384
commit f3e85e1dbb
2 changed files with 8 additions and 0 deletions

View File

@ -57,3 +57,10 @@ void fb_free()
pointer += *((uint32_t *) pointer); // Get size and pop.
}
}
void fb_free_all()
{
while (pointer < &_fs_cache) {
pointer += *((uint32_t *) pointer); // Get size and pop.
}
}

View File

@ -13,4 +13,5 @@ void fb_alloc_init0();
void *fb_alloc(uint32_t size);
void *fb_alloc0(uint32_t size);
void fb_free();
void fb_free_all();
#endif /* __FF_ALLOC_H__ */