Displaying 2 results from an estimated 2 matches for "stacknleft".
Did you mean:
stacklet
2012 Jul 02
0
[klibc:master] [MEMALLOC] Avoid gcc warning: variable ' oldstackp' set but not used
...-
usr/dash/memalloc.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/usr/dash/memalloc.c b/usr/dash/memalloc.c
index e75e609..9fea067 100644
--- a/usr/dash/memalloc.c
+++ b/usr/dash/memalloc.c
@@ -206,20 +206,18 @@ growstackblock(void)
{
size_t newlen;
- newlen = stacknleft * 2;
+ newlen = stacknleft * 2;
if (newlen < stacknleft)
sh_error("Out of space");
if (newlen < 128)
newlen += 128;
if (stacknxt == stackp->space && stackp != &stackbase) {
- struct stack_block *oldstackp;
struct stack_block *sp;
struct stack_bloc...
2020 Mar 28
0
[klibc:update-dash] dash: memalloc: Avoid looping in growstackto
...lloc.c
index 9d1de74a..60637da1 100644
--- a/usr/dash/memalloc.c
+++ b/usr/dash/memalloc.c
@@ -201,16 +201,16 @@ popstackmark(struct stackmark *mark)
* part of the block that has been used.
*/
-void
-growstackblock(void)
+static void growstackblock(size_t min)
{
size_t newlen;
newlen = stacknleft * 2;
if (newlen < stacknleft)
sh_error("Out of space");
- if (newlen < 128)
- newlen += 128;
+ min = SHELL_ALIGN(min | 128);
+ if (newlen < min)
+ newlen += min;
if (stacknxt == stackp->space && stackp != &stackbase) {
struct stack_block *sp;
@@ -261,...