Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
09cee18a
Commit
09cee18a
authored
May 20, 2016
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util: Move shmalloc to rst-malloc
Signed-off-by:
Pavel Emelyanov
<
xemul@virtuozzo.com
>
parent
6319ca2b
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
24 additions
and
22 deletions
+24
-22
files-reg.c
criu/files-reg.c
+1
-1
files.c
criu/files.c
+1
-1
rst-malloc.h
criu/include/rst-malloc.h
+3
-0
util.h
criu/include/util.h
+0
-3
namespaces.c
criu/namespaces.c
+1
-1
protobuf.c
criu/protobuf.c
+1
-1
pstree.c
criu/pstree.c
+1
-1
rst-malloc.c
criu/rst-malloc.c
+13
-0
sk-inet.c
criu/sk-inet.c
+1
-1
stats.c
criu/stats.c
+1
-0
tty.c
criu/tty.c
+1
-1
util.c
criu/util.c
+0
-12
No files found.
criu/files-reg.c
View file @
09cee18a
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#include "files.h"
#include "files.h"
#include "image.h"
#include "image.h"
#include "list.h"
#include "list.h"
#include "
util
.h"
#include "
rst-malloc
.h"
#include "fs-magic.h"
#include "fs-magic.h"
#include "asm/atomic.h"
#include "asm/atomic.h"
#include "namespaces.h"
#include "namespaces.h"
...
...
criu/files.c
View file @
09cee18a
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
#include "file-lock.h"
#include "file-lock.h"
#include "image.h"
#include "image.h"
#include "list.h"
#include "list.h"
#include "
util
.h"
#include "
rst-malloc
.h"
#include "util-pie.h"
#include "util-pie.h"
#include "lock.h"
#include "lock.h"
#include "sockets.h"
#include "sockets.h"
...
...
criu/include/rst-malloc.h
View file @
09cee18a
...
@@ -71,4 +71,7 @@ extern void rst_mem_align(int type);
...
@@ -71,4 +71,7 @@ extern void rst_mem_align(int type);
extern
unsigned
long
rst_mem_lock
(
void
);
extern
unsigned
long
rst_mem_lock
(
void
);
extern
int
rst_mem_remap
(
void
*
to
);
extern
int
rst_mem_remap
(
void
*
to
);
extern
void
*
shmalloc
(
size_t
bytes
);
extern
void
shfree_last
(
void
*
ptr
);
#endif
/* __CR_RST_MALLOC__H__ */
#endif
/* __CR_RST_MALLOC__H__ */
criu/include/util.h
View file @
09cee18a
...
@@ -169,9 +169,6 @@ extern int is_anon_link_type(char *link, char *type);
...
@@ -169,9 +169,6 @@ extern int is_anon_link_type(char *link, char *type);
((c) >= 'a' && (c) <= 'f') || \
((c) >= 'a' && (c) <= 'f') || \
((c) >= 'A' && (c) <= 'F'))
((c) >= 'A' && (c) <= 'F'))
extern
void
*
shmalloc
(
size_t
bytes
);
extern
void
shfree_last
(
void
*
ptr
);
#define CRS_CAN_FAIL 0x1
/* cmd can validly exit with non zero code */
#define CRS_CAN_FAIL 0x1
/* cmd can validly exit with non zero code */
extern
int
cr_system
(
int
in
,
int
out
,
int
err
,
char
*
cmd
,
char
*
const
argv
[],
unsigned
flags
);
extern
int
cr_system
(
int
in
,
int
out
,
int
err
,
char
*
cmd
,
char
*
const
argv
[],
unsigned
flags
);
...
...
criu/namespaces.c
View file @
09cee18a
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#include <sched.h>
#include <sched.h>
#include <sys/capability.h>
#include <sys/capability.h>
#include "
util
.h"
#include "
rst-malloc
.h"
#include "imgset.h"
#include "imgset.h"
#include "uts_ns.h"
#include "uts_ns.h"
#include "ipc_ns.h"
#include "ipc_ns.h"
...
...
criu/protobuf.c
View file @
09cee18a
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
#include "compiler.h"
#include "compiler.h"
#include "asm/types.h"
#include "asm/types.h"
#include "log.h"
#include "log.h"
#include "
util
.h"
#include "
rst-malloc
.h"
#include "string.h"
#include "string.h"
#include "sockets.h"
#include "sockets.h"
#include "cr_options.h"
#include "cr_options.h"
...
...
criu/pstree.c
View file @
09cee18a
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#include "cr_options.h"
#include "cr_options.h"
#include "pstree.h"
#include "pstree.h"
#include "
util
.h"
#include "
rst-malloc
.h"
#include "lock.h"
#include "lock.h"
#include "namespaces.h"
#include "namespaces.h"
#include "files.h"
#include "files.h"
...
...
criu/rst-malloc.c
View file @
09cee18a
...
@@ -231,3 +231,16 @@ int rst_mem_remap(void *to)
...
@@ -231,3 +231,16 @@ int rst_mem_remap(void *to)
return
ret
;
return
ret
;
}
}
void
*
shmalloc
(
size_t
bytes
)
{
rst_mem_align
(
RM_SHARED
);
return
rst_mem_alloc
(
bytes
,
RM_SHARED
);
}
/* Only last chunk can be released */
void
shfree_last
(
void
*
ptr
)
{
rst_mem_free_last
(
RM_SHARED
);
}
criu/sk-inet.c
View file @
09cee18a
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
#include "files.h"
#include "files.h"
#include "image.h"
#include "image.h"
#include "log.h"
#include "log.h"
#include "
util
.h"
#include "
rst-malloc
.h"
#include "sockets.h"
#include "sockets.h"
#include "sk-inet.h"
#include "sk-inet.h"
...
...
criu/stats.c
View file @
09cee18a
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#include <fcntl.h>
#include <fcntl.h>
#include <sys/time.h>
#include <sys/time.h>
#include "asm/atomic.h"
#include "asm/atomic.h"
#include "rst-malloc.h"
#include "protobuf.h"
#include "protobuf.h"
#include "stats.h"
#include "stats.h"
#include "image.h"
#include "image.h"
...
...
criu/tty.c
View file @
09cee18a
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#include "imgset.h"
#include "imgset.h"
#include "servicefd.h"
#include "servicefd.h"
#include "image.h"
#include "image.h"
#include "
util
.h"
#include "
rst-malloc
.h"
#include "log.h"
#include "log.h"
#include "list.h"
#include "list.h"
#include "util-pie.h"
#include "util-pie.h"
...
...
criu/util.c
View file @
09cee18a
...
@@ -558,18 +558,6 @@ int is_anon_link_type(char *link, char *type)
...
@@ -558,18 +558,6 @@ int is_anon_link_type(char *link, char *type)
return
!
strcmp
(
link
,
aux
);
return
!
strcmp
(
link
,
aux
);
}
}
void
*
shmalloc
(
size_t
bytes
)
{
rst_mem_align
(
RM_SHARED
);
return
rst_mem_alloc
(
bytes
,
RM_SHARED
);
}
/* Only last chunk can be released */
void
shfree_last
(
void
*
ptr
)
{
rst_mem_free_last
(
RM_SHARED
);
}
#define DUP_SAFE(fd, out) \
#define DUP_SAFE(fd, out) \
({ \
({ \
int ret__; \
int ret__; \
...
...
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