// +FHDR------------------------------------------------------------
//                 Copyright (c) 2020 PicocomTech.
//                       ALL RIGHTS RESERVED
// -----------------------------------------------------------------
// Filename      : msg_transfer_mem_info.c
// Author        : xianfeng.du
// Created On    : 2022-06-27
// Last Modified :
// -----------------------------------------------------------------
// Description:
//
//
// -FHDR------------------------------------------------------------

#include <malloc.h>
#include <string.h>
#include "ucp_printf.h"
#include "msg_transfer_mem.h"

MsgQueueLocalMgt_t*  gMsgQueueLocalMgtPtr;//im section

static inline void set_msg_queue_local_mgt(uint8_t* buf)
{
    gMsgQueueLocalMgtPtr = (MsgQueueLocalMgt_t *)buf;
}

ALWAYS_INLINE MsgQueueLocalMgt_t* get_msg_queue_local_mgt(void)
{
    return gMsgQueueLocalMgtPtr;
}

void msg_transfer_mem_alloc(void)
{
    UCP_PRINT_EMPTY("start allocating local memory");
    uint8_t *ptr = (uint8_t *)malloc(sizeof(MsgQueueLocalMgt_t));//im
    set_msg_queue_local_mgt(ptr);
    memset((void *)ptr,0,sizeof(MsgQueueLocalMgt_t));

    return;
}


