Deleted Added
full compact
subr_vmem.c (295870) subr_vmem.c (301791)
1/*-
2 * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi,
3 * Copyright (c) 2013 EMC Corp.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 25 unchanged lines hidden (view full) ---

34/*
35 * reference:
36 * - Magazines and Vmem: Extending the Slab Allocator
37 * to Many CPUs and Arbitrary Resources
38 * http://www.usenix.org/event/usenix01/bonwick.html
39 */
40
41#include <sys/cdefs.h>
1/*-
2 * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi,
3 * Copyright (c) 2013 EMC Corp.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 25 unchanged lines hidden (view full) ---

34/*
35 * reference:
36 * - Magazines and Vmem: Extending the Slab Allocator
37 * to Many CPUs and Arbitrary Resources
38 * http://www.usenix.org/event/usenix01/bonwick.html
39 */
40
41#include <sys/cdefs.h>
42__FBSDID("$FreeBSD: stable/10/sys/kern/subr_vmem.c 295870 2016-02-21 22:34:09Z marius $");
42__FBSDID("$FreeBSD: stable/10/sys/kern/subr_vmem.c 301791 2016-06-10 14:45:20Z ngie $");
43
44#include "opt_ddb.h"
45
46#include <sys/param.h>
47#include <sys/systm.h>
48#include <sys/kernel.h>
49#include <sys/queue.h>
50#include <sys/callout.h>

--- 990 unchanged lines hidden (view full) ---

1041{
1042
1043 vmem_t *vm;
1044
1045 vm = malloc(sizeof(*vm), M_VMEM, flags & (M_WAITOK|M_NOWAIT));
1046 if (vm == NULL)
1047 return (NULL);
1048 if (vmem_init(vm, name, base, size, quantum, qcache_max,
43
44#include "opt_ddb.h"
45
46#include <sys/param.h>
47#include <sys/systm.h>
48#include <sys/kernel.h>
49#include <sys/queue.h>
50#include <sys/callout.h>

--- 990 unchanged lines hidden (view full) ---

1041{
1042
1043 vmem_t *vm;
1044
1045 vm = malloc(sizeof(*vm), M_VMEM, flags & (M_WAITOK|M_NOWAIT));
1046 if (vm == NULL)
1047 return (NULL);
1048 if (vmem_init(vm, name, base, size, quantum, qcache_max,
1049 flags) == NULL) {
1050 free(vm, M_VMEM);
1049 flags) == NULL)
1051 return (NULL);
1050 return (NULL);
1052 }
1053 return (vm);
1054}
1055
1056void
1057vmem_destroy(vmem_t *vm)
1058{
1059
1060 mtx_lock(&vmem_list_lock);

--- 528 unchanged lines hidden ---
1051 return (vm);
1052}
1053
1054void
1055vmem_destroy(vmem_t *vm)
1056{
1057
1058 mtx_lock(&vmem_list_lock);

--- 528 unchanged lines hidden ---