search for: growstackto

Displaying 3 results from an estimated 3 matches for "growstackto".

2020 Mar 28
0
[klibc:update-dash] dash: memalloc: Add growstackto helper
...c/klibc.git;a=commit;h=1df4e2a6786b049decbc6ab1683108da86479891 Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Sat, 19 May 2018 02:39:46 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:55 +0000 [klibc] dash: memalloc: Add growstackto helper [ dash commit a9c4e4c9fc11cf1bd17d08e166405f7ab355a9f3 ] This patch adds the growstackto helper which repeatedly calls growstackblock until the requested size is reached. Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org....
2020 Mar 28
0
[klibc:update-dash] dash: memalloc: Avoid looping in growstackto
...=commit;h=21ceb151c758eb2384962b9ee8abc33b5bd674e9 Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Thu, 31 May 2018 01:51:48 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:55 +0000 [klibc] dash: memalloc: Avoid looping in growstackto [ dash commit e9cb50188b1b04b6e5e8e8ccc8874b2abcff8bb1 ] Currently growstackto will repeatedly call growstackblock until the requisite size is obtained. This is wasteful. This patch changes growstackblock to take a minimum size instead. Signed-off-by: Herbert Xu <herbert at gondor.apana.org...
2020 Mar 28
0
[klibc:update-dash] dash: exec: Stricter pathopt parsing
...*start; + size_t qlen; size_t len; if (*path == NULL) return -1; + + lpathopt = NULL; start = *path; - for (p = start ; *p && *p != ':' && *p != '%' ; p++); - len = p - start + strlen(name) + 2; /* "2" is for '/' and '\0' */ - q = growstackto(len); - if (p != start) { - memcpy(q, start, p - start); - q += p - start; - *q++ = '/'; + + if (*start == '%' && (p = legal_pathopt(start + 1, term, magic))) { + lpathopt = start + 1; + start = p; + term = ":"; } - strcpy(q, name); - pathopt = NULL; + + le...