exip
Alpha 0.5.4
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
build
gcc
contiki
d_mem.h
Go to the documentation of this file.
1
/*
2
* "Copyright (c) 2008, 2009 The Regents of the University of California.
3
* All rights reserved."
4
*
5
* Permission to use, copy, modify, and distribute this software and its
6
* documentation for any purpose, without fee, and without written agreement is
7
* hereby granted, provided that the above copyright notice, the following
8
* two paragraphs and the author appear in all copies of this software.
9
*
10
* IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
11
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
12
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
13
* CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
*
15
* THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
16
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
17
* AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
18
* ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
19
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
20
*
21
*/
22
23
#ifndef D_MEM_H_
24
#define D_MEM_H_
25
26
#include <
stdint.h
>
27
#define D_MEM_HEAP_SIZE 4095
28
29
// align on this number of byte boundarie#s
30
#define D_MEM_ALIGN 2
31
#define D_MEM_LEN 0x0fff
32
#define D_MEM_INUSE 0x8000
33
34
extern
uint8_t
heap
[
D_MEM_HEAP_SIZE
];
35
typedef
uint16_t
bndrt_t
;
36
37
void
d_malloc_init
();
38
void
*
d_malloc
(
uint16_t
sz);
39
void
d_free
(
void
*ptr);
40
uint16_t
d_malloc_freespace
();
41
42
void
*
d_realloc
(
void
* ptr,
uint16_t
size);
43
44
uint16_t
getMemUsage
();
45
46
#endif // D_MEM_H_
Generated on Thu Nov 27 2014 10:56:08 for exip by
1.8.4