[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTikgq2uAW5ko0qG5fe+w-LGvwiV6z3Oi51V_QuiK@mail.gmail.com>
Date: Mon, 1 Nov 2010 20:58:49 +0200
From: Pekka Enberg <penberg@...nel.org>
To: Tracey Dent <tdent48227@...il.com>
Cc: greg@...ah.com, manningc2@...rix.gen.nz,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 05/29] Staging: yaffs2: yaffs_allocator: Add files
On Mon, Nov 1, 2010 at 8:40 PM, Tracey Dent <tdent48227@...il.com> wrote:
> Adding files to yaffs2 directory.
>
> Signed-off-by: Tracey Dent <tdent48227@...il.com>
> ---
> drivers/staging/yaffs2/yaffs_allocator.c | 408 ++++++++++++++++++++++++++++++
> drivers/staging/yaffs2/yaffs_allocator.h | 30 +++
> 2 files changed, 438 insertions(+), 0 deletions(-)
> create mode 100644 drivers/staging/yaffs2/yaffs_allocator.c
> create mode 100644 drivers/staging/yaffs2/yaffs_allocator.h
>
> diff --git a/drivers/staging/yaffs2/yaffs_allocator.c b/drivers/staging/yaffs2/yaffs_allocator.c
> new file mode 100644
> index 0000000..024ee2a
> --- /dev/null
> +++ b/drivers/staging/yaffs2/yaffs_allocator.c
> @@ -0,0 +1,408 @@
> +/*
> + * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
> + *
> + * Copyright (C) 2002-2010 Aleph One Ltd.
> + * for Toby Churchill Ltd and Brightstar Engineering
> + *
> + * Created by Charles Manning <charles@...ph1.co.uk>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +
> +
> +#include "yaffs_allocator.h"
> +#include "yaffs_guts.h"
> +#include "yaffs_trace.h"
> +#include "yportenv.h"
> +
> +#ifdef CONFIG_YAFFS_YMALLOC_ALLOCATOR
> +
> +void yaffs_deinit_raw_tnodes_and_objs(yaffs_dev_t *dev)
> +{
> + dev = dev;
> +}
> +
> +void yaffs_init_raw_tnodes_and_objs(yaffs_dev_t *dev)
> +{
> + dev = dev;
> +}
> +
> +yaffs_tnode_t *yaffs_alloc_raw_tnode(yaffs_dev_t *dev)
> +{
> + return (yaffs_tnode_t *)YMALLOC(dev->tnode_size);
> +}
> +
> +void yaffs_free_raw_tnode(yaffs_dev_t *dev, yaffs_tnode_t *tn)
> +{
> + dev = dev;
> + YFREE(tn);
> +}
So you have your own dynamic memory allocator? What's wrong with kmalloc()?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists