blob: ad702f13cbb1f01d9cf3372c9024f2535f4300fb [file] [log] [blame]
anjana_sreekumar@infosys.com991c2062020-01-08 11:42:57 +05301 /*
2 * Copyright 2019-present Infosys Limited
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6/******************************************************************************
7 * mmContextManager.cpp
8 * This is an auto generated file.
9 * Please do not edit this file.
10 * All edits to be made through template source file
11 * <TOP-DIR/scripts/SMCodeGen/templates/ctxtManagerTmpls/blockPoolManager.cpp.tt>
12 ******************************************************************************/
13
14#include "memPoolManager.h"
15#include "contextManager/dataBlocks.h"
16#include "contextManager/mmContextManager.h"
17
18using namespace cmn::memPool;
19
20namespace mme
21{
22 /******************************************************************************
23 * Constructor
24 ******************************************************************************/
25 MmContextManager::MmContextManager( int numOfBlocks ):poolManager_m(numOfBlocks)
26 {
27 }
28
29 /******************************************************************************
30 * Destructor
31 ******************************************************************************/
32 MmContextManager::~MmContextManager()
33 {
34 }
35
36 /******************************************************************************
37 * Allocate MmContext data block
38 ******************************************************************************/
39 MmContext* MmContextManager::allocateMmContext()
40 {
41 MmContext* MmContext_p = poolManager_m.allocate();
42 return MmContext_p;
43 }
44
45 /******************************************************************************
46 * Deallocate a MmContext data block
47 ******************************************************************************/
48 void MmContextManager::deallocateMmContext(MmContext* MmContextp )
49 {
50 poolManager_m.free( MmContextp );
51 }
52}