Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
fd37617e
Commit
fd37617e
authored
Dec 29, 2008
by
Pekka Enberg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'topic/fixes', 'topic/cleanups' and 'topic/documentation' into for-linus
parents
7b8f3b66
9f6c708e
249da166
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
48 deletions
+51
-48
include/linux/slab.h
include/linux/slab.h
+4
-4
mm/slab.c
mm/slab.c
+7
-5
mm/slub.c
mm/slub.c
+40
-39
No files found.
include/linux/slab.h
View file @
fd37617e
...
...
@@ -253,9 +253,9 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep,
* request comes from.
*/
#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB)
extern
void
*
__kmalloc_track_caller
(
size_t
,
gfp_t
,
void
*
);
extern
void
*
__kmalloc_track_caller
(
size_t
,
gfp_t
,
unsigned
long
);
#define kmalloc_track_caller(size, flags) \
__kmalloc_track_caller(size, flags, _
_builtin_return_address(0)
)
__kmalloc_track_caller(size, flags, _
RET_IP_
)
#else
#define kmalloc_track_caller(size, flags) \
__kmalloc(size, flags)
...
...
@@ -271,10 +271,10 @@ extern void *__kmalloc_track_caller(size_t, gfp_t, void*);
* allocation request comes from.
*/
#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB)
extern
void
*
__kmalloc_node_track_caller
(
size_t
,
gfp_t
,
int
,
void
*
);
extern
void
*
__kmalloc_node_track_caller
(
size_t
,
gfp_t
,
int
,
unsigned
long
);
#define kmalloc_node_track_caller(size, flags, node) \
__kmalloc_node_track_caller(size, flags, node, \
_
_builtin_return_address(0)
)
_
RET_IP_
)
#else
#define kmalloc_node_track_caller(size, flags, node) \
__kmalloc_node(size, flags, node)
...
...
mm/slab.c
View file @
fd37617e
...
...
@@ -2123,6 +2123,8 @@ static int __init_refok setup_cpu_cache(struct kmem_cache *cachep)
*
* @name must be valid until the cache is destroyed. This implies that
* the module calling this has to destroy the cache before getting unloaded.
* Note that kmem_cache_name() is not guaranteed to return the same pointer,
* therefore applications must manage it themselves.
*
* The flags are
*
...
...
@@ -2997,7 +2999,7 @@ static void *cache_alloc_refill(struct kmem_cache *cachep, gfp_t flags)
* there must be at least one object available for
* allocation.
*/
BUG_ON
(
slabp
->
inuse
<
0
||
slabp
->
inuse
>=
cachep
->
num
);
BUG_ON
(
slabp
->
inuse
>=
cachep
->
num
);
while
(
slabp
->
inuse
<
cachep
->
num
&&
batchcount
--
)
{
STATS_INC_ALLOCED
(
cachep
);
...
...
@@ -3686,9 +3688,9 @@ void *__kmalloc_node(size_t size, gfp_t flags, int node)
EXPORT_SYMBOL
(
__kmalloc_node
);
void
*
__kmalloc_node_track_caller
(
size_t
size
,
gfp_t
flags
,
int
node
,
void
*
caller
)
int
node
,
unsigned
long
caller
)
{
return
__do_kmalloc_node
(
size
,
flags
,
node
,
caller
);
return
__do_kmalloc_node
(
size
,
flags
,
node
,
(
void
*
)
caller
);
}
EXPORT_SYMBOL
(
__kmalloc_node_track_caller
);
#else
...
...
@@ -3730,9 +3732,9 @@ void *__kmalloc(size_t size, gfp_t flags)
}
EXPORT_SYMBOL
(
__kmalloc
);
void
*
__kmalloc_track_caller
(
size_t
size
,
gfp_t
flags
,
void
*
caller
)
void
*
__kmalloc_track_caller
(
size_t
size
,
gfp_t
flags
,
unsigned
long
caller
)
{
return
__do_kmalloc
(
size
,
flags
,
caller
);
return
__do_kmalloc
(
size
,
flags
,
(
void
*
)
caller
);
}
EXPORT_SYMBOL
(
__kmalloc_track_caller
);
...
...
mm/slub.c
View file @
fd37617e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment