Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
5b991ae2
Commit
5b991ae2
authored
Apr 20, 2014
by
Paul Sokolovsky
Browse files
gc: gc_realloc(): Fix byte-to-block calculation.
parent
dde739d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/gc.c
View file @
5b991ae2
...
...
@@ -480,7 +480,7 @@ void *gc_realloc(void *ptr_in, machine_uint_t n_bytes) {
}
// compute number of new blocks that are requested
machine_uint_t
new_blocks
=
(
n_bytes
+
BYTES_PER_BLOCK
)
/
BYTES_PER_BLOCK
;
machine_uint_t
new_blocks
=
(
n_bytes
+
BYTES_PER_BLOCK
-
1
)
/
BYTES_PER_BLOCK
;
// get the number of consecutive tail blocks and
// the number of free blocks after last tail block
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment