Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Bastien Legoy
ensimag-malloc
Commits
ada01fca
Commit
ada01fca
authored
Jan 11, 2022
by
legoyb
Browse files
Sync
parent
cff3894c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/mem_internals.c
src/mem_internals.c
+2
-2
No files found.
src/mem_internals.c
View file @
ada01fca
...
...
@@ -17,7 +17,7 @@ unsigned long knuth_mmix_one_round(unsigned long in)
void
*
mark_memarea_and_get_user_ptr
(
void
*
ptr
,
unsigned
long
size
,
MemKind
k
)
{
unsigned
long
magic_value
=
knuth_mmix_one_round
(
*
(
unsigned
long
*
)
ptr
)
&
~
(
0
b11UL
)
&
(
unsigned
long
)
k
;
unsigned
long
magic_value
=
knuth_mmix_one_round
((
unsigned
long
)
ptr
)
&
~
(
0
b11UL
)
&
(
unsigned
long
)
k
;
unsigned
long
real_size
=
size
+
32
;
// Set First 16 bytes
...
...
@@ -37,7 +37,7 @@ Alloc
mark_check_and_get_alloc
(
void
*
ptr
)
{
// Compute Magic Value
unsigned
long
gen_magic_value
=
knuth_mmix_one_round
(
*
(
unsigned
long
*
)
(
ptr
-
16
))
&
~
(
0
b11UL
);
unsigned
long
gen_magic_value
=
knuth_mmix_one_round
((
unsigned
long
)
(
ptr
-
16
))
&
~
(
0
b11UL
);
// Get 16 First bytes
unsigned
long
real_size
=
*
(
unsigned
long
*
)
(
ptr
-
16
);
...
...
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