Subversion Repositories Kolibri OS

Rev

Rev 6082 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6082 Rev 6936
Line 84... Line 84...
84
#ifdef CONFIG_FAILSLAB
84
#ifdef CONFIG_FAILSLAB
85
# define SLAB_FAILSLAB		0x02000000UL	/* Fault injection mark */
85
# define SLAB_FAILSLAB		0x02000000UL	/* Fault injection mark */
86
#else
86
#else
87
# define SLAB_FAILSLAB		0x00000000UL
87
# define SLAB_FAILSLAB		0x00000000UL
88
#endif
88
#endif
-
 
89
#if defined(CONFIG_MEMCG) && !defined(CONFIG_SLOB)
-
 
90
# define SLAB_ACCOUNT		0x04000000UL	/* Account to memcg */
-
 
91
#else
-
 
92
# define SLAB_ACCOUNT		0x00000000UL
-
 
93
#endif
Line 89... Line 94...
89
 
94
 
90
/* The following flags affect the page allocator grouping pages by mobility */
95
/* The following flags affect the page allocator grouping pages by mobility */
91
#define SLAB_RECLAIM_ACCOUNT	0x00020000UL		/* Objects are reclaimable */
96
#define SLAB_RECLAIM_ACCOUNT	0x00020000UL		/* Objects are reclaimable */
92
#define SLAB_TEMPORARY		SLAB_RECLAIM_ACCOUNT	/* Objects are short-lived */
97
#define SLAB_TEMPORARY		SLAB_RECLAIM_ACCOUNT	/* Objects are short-lived */
Line 111... Line 116...
111
			void (*)(void *));
116
			void (*)(void *));
112
void kmem_cache_destroy(struct kmem_cache *);
117
void kmem_cache_destroy(struct kmem_cache *);
113
int kmem_cache_shrink(struct kmem_cache *);
118
int kmem_cache_shrink(struct kmem_cache *);
114
void kmem_cache_free(struct kmem_cache *, void *);
119
void kmem_cache_free(struct kmem_cache *, void *);
Line 115... Line 120...
115
 
120
 
116
static inline void *krealloc(void *p, size_t new_size, gfp_t flags)
121
static inline void *krealloc(const void *p, size_t new_size, gfp_t flags)
117
{
122
{
118
    return __builtin_realloc(p, new_size);
123
    return __builtin_realloc((void*)p, new_size);
Line 119... Line 124...
119
}
124
}
120
 
125
 
121
static inline void kfree(void *p)
126
static inline void kfree(const void *p)
122
{
127
{
123
	__builtin_free(p);
128
    __builtin_free((void*)p);
124
}
129
}
125
static __always_inline void *kmalloc(size_t size, gfp_t flags)
130
static __always_inline void *kmalloc(size_t size, gfp_t flags)
126
{
131
{