Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
d51f3f8f
Commit
d51f3f8f
authored
9 years ago
by
Konstantin Osipov
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/snapshot-crash' into 1.6
parents
c7c00c61
4adced63
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/box/memtx_engine.cc
+2
-7
2 additions, 7 deletions
src/box/memtx_engine.cc
src/box/tuple.cc
+2
-11
2 additions, 11 deletions
src/box/tuple.cc
src/lib/small/small.c
+1
-3
1 addition, 3 deletions
src/lib/small/small.c
with
5 additions
and
21 deletions
src/box/memtx_engine.cc
+
2
−
7
View file @
d51f3f8f
...
...
@@ -58,7 +58,7 @@
*/
extern
struct
quota
memtx_quota
;
static
bool
memtx_index_arena_initialized
=
false
;
static
struct
slab_arena
memtx_
index_
arena
;
extern
struct
slab_arena
memtx_arena
;
static
struct
slab_cache
memtx_index_slab_cache
;
struct
mempool
memtx_index_extent_pool
;
/**
...
...
@@ -897,13 +897,8 @@ memtx_index_arena_init()
/* already done.. */
return
;
}
/* Creating arena */
if
(
slab_arena_create
(
&
memtx_index_arena
,
&
memtx_quota
,
0
,
MEMTX_SLAB_SIZE
,
MAP_PRIVATE
))
{
panic_syserror
(
"failed to initialize index arena"
);
}
/* Creating slab cache */
slab_cache_create
(
&
memtx_index_slab_cache
,
&
memtx_
index_
arena
);
slab_cache_create
(
&
memtx_index_slab_cache
,
&
memtx_arena
);
/* Creating mempool */
mempool_create
(
&
memtx_index_extent_pool
,
&
memtx_index_slab_cache
,
...
...
This diff is collapsed.
Click to expand it.
src/box/tuple.cc
+
2
−
11
View file @
d51f3f8f
...
...
@@ -606,19 +606,10 @@ tuple_init(float tuple_arena_max_size, uint32_t objsize_min,
size_t
prealloc
=
tuple_arena_max_size
*
1024
*
1024
*
1024
;
quota_init
(
&
memtx_quota
,
prealloc
);
int
flags
;
if
(
access
(
"/proc/user_beancounters"
,
F_OK
)
==
0
)
{
say_warn
(
"disable shared arena since running under OpenVZ "
"(https://bugzilla.openvz.org/show_bug.cgi?id=2805)"
);
flags
=
MAP_PRIVATE
;
}
else
{
say_info
(
"mapping %zu bytes for a shared arena..."
,
prealloc
);
flags
=
MAP_SHARED
;
}
say_info
(
"mapping %zu bytes for tuple arena..."
,
prealloc
);
if
(
slab_arena_create
(
&
memtx_arena
,
&
memtx_quota
,
prealloc
,
slab_size
,
flags
))
{
prealloc
,
slab_size
,
MAP_PRIVATE
))
{
if
(
ENOMEM
==
errno
)
{
panic
(
"failed to preallocate %zu bytes: "
"Cannot allocate memory, check option "
...
...
This diff is collapsed.
Click to expand it.
src/lib/small/small.c
+
1
−
3
View file @
d51f3f8f
...
...
@@ -152,9 +152,7 @@ small_alloc_setopt(struct small_alloc *alloc, enum small_opt opt, bool val)
{
switch
(
opt
)
{
case
SMALL_DELAYED_FREE_MODE
:
/* Delayed mode is only usable if the arena is shared. */
if
(
alloc
->
cache
->
arena
->
flags
&
MAP_SHARED
)
alloc
->
is_delayed_free_mode
=
val
;
alloc
->
is_delayed_free_mode
=
val
;
break
;
default:
assert
(
false
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment