OSDN Git Service

(none)
[hos/hos-v4a.git] / aplfw / library / container / automemheap / automemheap_create.c
1 /** 
2  *  Hyper Operating System  Application Framework
3  *
4  * @file  automemheap_alloc.c
5  * @brief %jp{メモリヒープクラス}%en{auto size memory heap class}
6  *
7  * Copyright (C) 2006-2008 by Project HOS
8  * http://sourceforge.jp/projects/hos/
9  */
10
11
12 #include <stdio.h>
13 #include "hosaplfw.h"
14 #include "automemheap_local.h"
15
16
17
18 /** 生成 */
19 C_AUTOMEMHEAP *AutoMemHeap_Create(C_MEMHEAP *pMemHeap)
20 {
21         C_AUTOMEMHEAP   *self;
22         
23         /* メモリ確保 */
24         if ( (self = (C_AUTOMEMHEAP *)MemHeap_Alloc(pMemHeap, sizeof(C_AUTOMEMHEAP))) == NULL )
25         {
26                 return NULL;
27         }
28         
29         /* コンストラクタ呼び出し */
30         AutoMemHeap_Constructor(self, pMemHeap);
31         
32         return (HANDLE)self;
33 }
34
35
36 /* end of file */