OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [include/] [linux/] [malloc.h] - Blame information for rev 1778

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
#ifndef _LINUX_MALLOC_H
2
#define _LINUX_MALLOC_H
3
 
4
#include <linux/mm.h>
5
 
6
#ifdef DEBUG_KMALLOC
7
 
8
#undef kmalloc
9
#undef kfree
10
 
11
extern void * kmalloc(size_t size, int priority);
12
extern void kfree(void * obj);
13
 
14
extern void * kmalloc_flf(size_t size, int priority, char * file, int line, char * function);
15
extern void kfree_flf(void * obj, char * file, int line, char * function);
16
extern unsigned int ksize(void * obj);
17
 
18
#define kmalloc(size, priority) kmalloc_flf(size, priority, __FILE__, __LINE__, __FUNCTION__)
19
#define kfree(obj) kfree_flf(obj, __FILE__, __LINE__, __FUNCTION__)
20
 
21
#else /* !DEBUG_KMALLOC */
22
 
23
extern void * kmalloc(size_t size, int priority);
24
extern void kfree(void * obj);
25
extern unsigned int ksize(void * obj);
26
 
27
#endif /* !DEBUG_KMALLOC */
28
 
29
#define kfree_s(a,b) kfree(a)
30
 
31
#endif /* _LINUX_MALLOC_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.