forked from xuos/xiuos
fix a bug
This commit is contained in:
parent
9f56e71545
commit
3e65883a7f
|
@ -1,5 +1,4 @@
|
|||
SRC_FILES := test_main.c
|
||||
SRC_FILES += extsram_test.c
|
||||
|
||||
ifeq ($(CONFIG_KERNEL_TEST_SEM),y)
|
||||
SRC_FILES += test_sem.c
|
||||
|
@ -32,6 +31,9 @@ endif
|
|||
ifeq ($(CONFIG_KERNEL_TEST_MEM),y)
|
||||
SRC_FILES += test_mem.c
|
||||
SRC_FILES += test_gatherblock.c
|
||||
ifeq ($(CONFIG_MEM_EXTERN_SRAM),y)
|
||||
SRC_FILES += extsram_test.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_KERNEL_TEST_TIMER),y)
|
||||
|
|
|
@ -668,8 +668,9 @@ void *x_malloc(x_size_t size)
|
|||
ret = ByteManager.dynamic_buddy_manager.done->malloc(&ByteManager.dynamic_buddy_manager, size, DYNAMIC_BLOCK_NO_EXTMEM_MASK);
|
||||
if(ret != NONE)
|
||||
CHECK(ByteManager.dynamic_buddy_manager.done->JudgeLegal(&ByteManager.dynamic_buddy_manager, ret - SIZEOF_DYNAMICALLOCNODE_MEM));
|
||||
try_extmem:
|
||||
|
||||
#ifdef MEM_EXTERN_SRAM
|
||||
try_extmem:
|
||||
if(NONE == ret) {
|
||||
for(i = 0; i < EXTSRAM_MAX_NUM; i++) {
|
||||
if(NONE != ExtByteManager[i].done) {
|
||||
|
@ -956,8 +957,9 @@ void *x_umalloc(x_size_t size)
|
|||
if(ret != NONE)
|
||||
CHECK(UserByteManager.dynamic_buddy_manager.done->JudgeLegal(&UserByteManager.dynamic_buddy_manager, ret - SIZEOF_DYNAMICALLOCNODE_MEM));
|
||||
|
||||
try_extmem:
|
||||
|
||||
#ifdef MEM_EXTERN_SRAM
|
||||
try_extmem:
|
||||
if(NONE == ret) {
|
||||
for(i = 0; i < EXTSRAM_MAX_NUM; i++) {
|
||||
if(NONE != ExtByteManager[i].done) {
|
||||
|
|
Loading…
Reference in New Issue