STATIC s32 use_smem_test(int size)
{
    u32* pret = (u32*)bsp_smalloc(size, MEM_ICC_DDR_POOL);
    u32* praw = pret;
    u32  rawsize = size;
    if(pret)
    {
        mem_print_dbg("sucess BSP_Malloc addr:%x   size:%d", pret, size);
        while(size > 0)
        {
            size -= sizeof(u32);
            *pret = ACORE_MAGIC_NUM;
            pret++;
        }
        taskDelay(200);
        size = rawsize;
        pret = praw;
        while(size > 0)
        {
            size -= sizeof(u32);
            if(*pret != ACORE_MAGIC_NUM)
            {
                mem_print_error("fail! Use smalloc fail addr:%x     size:%d", pret, size);
                return MEM_TEST_ERROR;
            }
            pret++;
        }

        bsp_sfree(praw);
        return MEM_TEST_OK;
    }
    else
    {
        mem_print_error("fail! BSP_Malloc addr:%x   size:%d", pret, size);
        return MEM_TEST_ERROR;
    }
}
STATIC void* bsp_pool_alloc(MEM_ALLOC_INFO* pAllocInfo, u32 u32Size)
{
    u32 u32RetAddr = pAllocInfo->memPoolInfo.u32CurPosAddr;

    if (pAllocInfo->memPoolInfo.u32Left < u32Size)
    {
        mem_print_error("alloc fail! left size = %x alloc size = %x", pAllocInfo->memPoolInfo.u32Left, u32Size);
        return NULL;
    }

    pAllocInfo->memPoolInfo.u32CurPosAddr += u32Size;
    pAllocInfo->memPoolInfo.u32Left -= u32Size;

    return (void*)(u32RetAddr+pAllocInfo->memPoolInfo.u32MgrSize);
}
STATIC u32 mem_smalloc_test(u32 size)
{
    void * pret = bsp_smalloc(size, MEM_ICC_DDR_POOL);
    if(pret)
    {
        mem_print_dbg("sucess BSP_Malloc addr:%x   size:%d", pret, size);
        bsp_sfree(pret);
        return MEM_TEST_OK;
    }
    else
    {
        mem_print_error("fail! BSP_Malloc addr:%x   size:%d", pret, size);
        return MEM_TEST_ERROR;
    }

}