Message:
Hello nixi...@gmail.com (cc: nix...@googlegroups.com),
I'd like you to review this change to
https://code.google.com/p/nix-os/
Description:
realloc: bug, realloc does not update tailptr.
Please review this at http://codereview.appspot.com/5949043/
Affected files:
M sys/src/nix/k10/qmalloc.c
Index: sys/src/nix/k10/qmalloc.c
===================================================================
--- a/sys/src/nix/k10/qmalloc.c
+++ b/sys/src/nix/k10/qmalloc.c
@@ -592,12 +592,14 @@
if(ounits > nunits){
p->s.size = nunits;
tailsize += ounits-nunits;
+ tailptr -= ounits-nunits;
MUNLOCK;
return ap;
}
if(tailsize >= nunits-ounits){
p->s.size = nunits;
tailsize -= nunits-ounits;
+ tailptr += nunits-ounits;
MUNLOCK;
return ap;
}