linux/samples/kmemleak/kmemleak-test.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * samples/kmemleak/kmemleak-test.c
 *
 * Copyright (C) 2008 ARM Limited
 * Written by Catalin Marinas <[email protected]>
 */

#define pr_fmt(fmt)

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/list.h>
#include <linux/percpu.h>
#include <linux/fdtable.h>

#include <linux/kmemleak.h>

struct test_node {};

static LIST_HEAD(test_list);
static DEFINE_PER_CPU(void *, kmemleak_test_pointer);

/*
 * Some very simple testing. This function needs to be extended for
 * proper testing.
 */
static int kmemleak_test_init(void)
{}
module_init(kmemleak_test_init);

static void __exit kmemleak_test_exit(void)
{}
module_exit(kmemleak_test_exit);

MODULE_DESCRIPTION();
MODULE_LICENSE();