libsat: setmalloctag, fix incorrect allocation size
This commit is contained in:
parent
547f60b4c5
commit
5d4a456ae6
2 changed files with 2 additions and 1 deletions
|
@ -106,6 +106,7 @@ satrealloc(SATSolve *s, void *v, ulong n)
|
|||
v = realloc(v, n);
|
||||
if(v == nil)
|
||||
saterror(s, "realloc: %r");
|
||||
setmalloctag(v, getcallerpc(&s));
|
||||
return v;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ solvinit(SATSolve *s)
|
|||
{
|
||||
satdebuginit(s);
|
||||
satheapreset(s);
|
||||
s->decbd = satrealloc(s, s->decbd, s->nvar * sizeof(int));
|
||||
s->decbd = satrealloc(s, s->decbd, (s->nvar + 1) * sizeof(int));
|
||||
s->decbd[0] = 0;
|
||||
s->trail = satrealloc(s, s->trail, sizeof(int) * s->nvar);
|
||||
s->fullrlits = satrealloc(s, s->fullrlits, sizeof(int) * s->nvar);
|
||||
|
|
Loading…
Reference in a new issue