skip 8 bit

This commit is contained in:
lyon 2021-11-16 10:20:28 +08:00
parent 9a14d1bc58
commit 88645154ca
12 changed files with 11 additions and 9 deletions

0
port/linux/api-make-linux.sh Normal file → Executable file
View File

0
port/linux/api-make-win10.sh Normal file → Executable file
View File

0
port/linux/api-make.sh Normal file → Executable file
View File

0
port/linux/gtest.sh Normal file → Executable file
View File

0
port/linux/init.sh Normal file → Executable file
View File

0
port/linux/make.sh Normal file → Executable file
View File

0
port/linux/package/pikascript/rust-msc-latest-linux Normal file → Executable file
View File

0
port/linux/pull-core.sh Normal file → Executable file
View File

0
port/linux/push-core.sh Normal file → Executable file
View File

0
port/linux/test-banchmark.sh Normal file → Executable file
View File

0
port/linux/update-compiler.sh Normal file → Executable file
View File

View File

@ -146,9 +146,11 @@ void* pool_malloc(Pool* pool, uint32_t size) {
for (uint32_t block_index = pool->block_index_min_free;
block_index < block_index_max; block_index++) {
/* 8 bit is not free */
if(0xFF == bitmap_getByte(pool->bitmap, block_index)){
// block_index = aline_by(block_index, 8) - 1;
// continue;
uint8_t bitmap_byte = bitmap_getByte(pool->bitmap, block_index);
if (0xFF == bitmap_byte) {
block_index = 8 * (block_index / 8) + 7;
block_num_found = 0;
continue;
}
/* found a free block */
if (0 == bitmap_get(pool->bitmap, block_index)) {