mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00:00
Add clang-format file
Also run it across the whole tree to get everything using the One True Style. We don't yet run this in an automated fashion as it's a little slow, but there is a snippet to do so in makeall.sh.
This commit is contained in:
parent
c11351ac50
commit
0dc9af5f7e
286 changed files with 3244 additions and 2424 deletions
27
AK/kmalloc.h
27
AK/kmalloc.h
|
@ -1,25 +1,26 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef KERNEL
|
||||
#define AK_MAKE_ETERNAL \
|
||||
public: \
|
||||
void* operator new(size_t size) { return kmalloc_eternal(size); } \
|
||||
private:
|
||||
# define AK_MAKE_ETERNAL \
|
||||
public: \
|
||||
void* operator new(size_t size) { return kmalloc_eternal(size); } \
|
||||
\
|
||||
private:
|
||||
#else
|
||||
#define AK_MAKE_ETERNAL
|
||||
# define AK_MAKE_ETERNAL
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
#include <Kernel/kmalloc.h>
|
||||
# include <Kernel/kmalloc.h>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
#define kcalloc calloc
|
||||
#define kmalloc malloc
|
||||
#define kfree free
|
||||
#define krealloc realloc
|
||||
# define kcalloc calloc
|
||||
# define kmalloc malloc
|
||||
# define kfree free
|
||||
# define krealloc realloc
|
||||
|
||||
#ifdef __serenity__
|
||||
# ifdef __serenity__
|
||||
inline void* operator new(size_t size)
|
||||
{
|
||||
return kmalloc(size);
|
||||
|
@ -44,6 +45,6 @@ inline void* operator new(size_t, void* ptr)
|
|||
{
|
||||
return ptr;
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue