Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
1d2f6c95
"README.md" did not exist on "bd588ad0f4bed71863f9b4a3d47661b38d70511d"
Commit
1d2f6c95
authored
5 years ago
by
Alam Ed Arias
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into next
parents
2162cbd7
15c263e9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/z_zone.c
+11
-8
11 additions, 8 deletions
src/z_zone.c
with
11 additions
and
8 deletions
src/z_zone.c
+
11
−
8
View file @
1d2f6c95
...
...
@@ -232,12 +232,12 @@ void Z_Free(void *ptr)
// Free the memory and get rid of the block.
free
(
block
->
real
);
block
->
prev
->
next
=
block
->
next
;
block
->
next
->
prev
=
block
->
prev
;
free
(
block
);
#ifdef VALGRIND_DESTROY_MEMPOOL
VALGRIND_DESTROY_MEMPOOL
(
block
);
#endif
block
->
prev
->
next
=
block
->
next
;
block
->
next
->
prev
=
block
->
prev
;
free
(
block
);
}
/** malloc() that doesn't accept failure.
...
...
@@ -317,13 +317,9 @@ void *Z_MallocAlign(size_t size, INT32 tag, void *user, INT32 alignbits)
// The mem header lives 'sizeof (memhdr_t)' bytes before given.
hdr
=
(
memhdr_t
*
)((
UINT8
*
)
given
-
sizeof
*
hdr
);
#ifdef VALGRIND_CREATE_MEMPOOL
VALGRIND_CREATE_MEMPOOL
(
block
,
padsize
,
Z_calloc
);
#ifdef HAVE_VALGRIND
Z_calloc
=
false
;
#endif
#ifdef VALGRIND_MEMPOOL_ALLOC
VALGRIND_MEMPOOL_ALLOC
(
block
,
hdr
,
size
+
sizeof
*
hdr
);
#endif
block
->
next
=
head
.
next
;
block
->
prev
=
&
head
;
...
...
@@ -341,6 +337,13 @@ void *Z_MallocAlign(size_t size, INT32 tag, void *user, INT32 alignbits)
block
->
size
=
blocksize
;
block
->
realsize
=
size
;
#ifdef VALGRIND_CREATE_MEMPOOL
VALGRIND_CREATE_MEMPOOL
(
block
,
padsize
,
Z_calloc
);
#endif
//#ifdef VALGRIND_MEMPOOL_ALLOC
// VALGRIND_MEMPOOL_ALLOC(block, hdr, size + sizeof *hdr);
//#endif
hdr
->
id
=
ZONEID
;
hdr
->
block
=
block
;
...
...
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