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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [ecos-2.0/] [packages/] [fs/] [jffs2/] [v2_0/] [src/] [malloc-ecos.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1254 phoenix
/*
2
 * JFFS2 -- Journalling Flash File System, Version 2.
3
 *
4
 * Copyright (C) 2001, 2002 Red Hat, Inc.
5
 *
6
 * Created by David Woodhouse <dwmw2@cambridge.redhat.com>
7
 *
8
 * For licensing information, see the file 'LICENCE' in this directory.
9
 *
10
 * $Id: malloc-ecos.c,v 1.1.1.1 2004-02-14 13:29:20 phoenix Exp $
11
 *
12
 */
13
 
14
#include <linux/kernel.h>
15
#include "nodelist.h"
16
 
17
struct jffs2_full_dirent *jffs2_alloc_full_dirent(int namesize)
18
{
19
        return malloc(sizeof(struct jffs2_full_dirent) + namesize);
20
}
21
 
22
void jffs2_free_full_dirent(struct jffs2_full_dirent *x)
23
{
24
        free(x);
25
}
26
 
27
struct jffs2_full_dnode *jffs2_alloc_full_dnode(void)
28
{
29
        return malloc(sizeof(struct jffs2_full_dnode));
30
}
31
 
32
void jffs2_free_full_dnode(struct jffs2_full_dnode *x)
33
{
34
        free(x);
35
}
36
 
37
struct jffs2_raw_dirent *jffs2_alloc_raw_dirent(void)
38
{
39
        return malloc(sizeof(struct jffs2_raw_dirent));
40
}
41
 
42
void jffs2_free_raw_dirent(struct jffs2_raw_dirent *x)
43
{
44
        free(x);
45
}
46
 
47
struct jffs2_raw_inode *jffs2_alloc_raw_inode(void)
48
{
49
        return malloc(sizeof(struct jffs2_raw_inode));
50
}
51
 
52
void jffs2_free_raw_inode(struct jffs2_raw_inode *x)
53
{
54
        free(x);
55
}
56
 
57
struct jffs2_tmp_dnode_info *jffs2_alloc_tmp_dnode_info(void)
58
{
59
        return malloc(sizeof(struct jffs2_tmp_dnode_info));
60
}
61
 
62
void jffs2_free_tmp_dnode_info(struct jffs2_tmp_dnode_info *x)
63
{
64
        free(x);
65
}
66
 
67
struct jffs2_raw_node_ref *jffs2_alloc_raw_node_ref(void)
68
{
69
        return malloc(sizeof(struct jffs2_raw_node_ref));
70
}
71
 
72
void jffs2_free_raw_node_ref(struct jffs2_raw_node_ref *x)
73
{
74
        free(x);
75
}
76
 
77
struct jffs2_node_frag *jffs2_alloc_node_frag(void)
78
{
79
        return malloc(sizeof(struct jffs2_node_frag));
80
}
81
 
82
void jffs2_free_node_frag(struct jffs2_node_frag *x)
83
{
84
        free(x);
85
}
86
 
87
struct jffs2_inode_cache *jffs2_alloc_inode_cache(void)
88
{
89
        struct jffs2_inode_cache *ret = malloc(sizeof(struct jffs2_inode_cache));
90
        D1(printk(KERN_DEBUG "Allocated inocache at %p\n", ret));
91
        return ret;
92
}
93
 
94
void jffs2_free_inode_cache(struct jffs2_inode_cache *x)
95
{
96
        D1(printk(KERN_DEBUG "Freeing inocache at %p\n", x));
97
        free(x);
98
}
99
 

powered by: WebSVN 2.1.0

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