diff --git a/elks/tools/objtools/ewcc b/elks/tools/objtools/ewcc index 3cfe8b87f..b129ed550 100755 --- a/elks/tools/objtools/ewcc +++ b/elks/tools/objtools/ewcc @@ -23,9 +23,8 @@ if [ -z "$WATCOM" ] fi ELKSLIBCINCLUDE=$TOPDIR/libc/include -ELKSINCLUDE1=$TOPDIR/include -ELKSINCLUDE2=$TOPDIR/elks/include -WATCINCLUDE=$WATCOM/h +ELKSINCLUDE1=$TOPDIR/elks/include +ELKSINCLUDE2=$TOPDIR/libc/include/watcom # owcc options: # -bnone # no target specific setup @@ -68,7 +67,6 @@ CCFLAGS="\ -I$ELKSLIBCINCLUDE \ -I$ELKSINCLUDE1 \ -I$ELKSINCLUDE2 \ - -I$WATCINCLUDE \ " while true; do diff --git a/libc/malloc/amalloc.c b/libc/malloc/amalloc.c index 24ac19f41..029534ef5 100644 --- a/libc/malloc/amalloc.c +++ b/libc/malloc/amalloc.c @@ -135,8 +135,9 @@ __amalloc(size_t nbytes) ASSERT(allocp>=(NPTR)allocs && allocp<=alloct); ASSERT(malloc_check_heap()); /* combine free areas at heap start before allocating from free area past allocp */ - allocp = (NPTR)allocs; + //allocp = (NPTR)allocs; /* NOTE: start at last allocation for speed */ for(p=allocp; ; ) { + //f = nb = n = 0; for(temp=0; ; ) { if(!testbusy(next(p))) { while(!testbusy(next(q = next(p)))) { @@ -147,12 +148,15 @@ __amalloc(size_t nbytes) (next(p) - p) * sizeof(union store), (next(q) - q) * sizeof(union store)); next(p) = next(q); + //f++; } /*debug2("q %04x p %04x nw %d p+nw %04x ", (unsigned)q, (unsigned)p, nw, (unsigned)(p+nw));*/ + //nb++; if(q>=p+nw && p+nw>=p) goto found; } + //n++; q = p; p = clearbusy(next(p)); if(p>q) { @@ -211,6 +215,7 @@ __amalloc(size_t nbytes) #endif } found: + //__dprintf("n %d, nb %d, f %d\n", n, nb, f); allocp = p + nw; ASSERT(allocp<=alloct); if(q>allocp) { diff --git a/libc/system/execvpe.c b/libc/system/execvpe.c index f76a4d8d0..252a43fa4 100644 --- a/libc/system/execvpe.c +++ b/libc/system/execvpe.c @@ -52,12 +52,13 @@ execvpe(const char *fname, char **argv, char **envp) strcpy(pname, path); strcat(pname, "/"); strcat(pname, fname); + if(p) *p++ = ':'; tryrun(pname, argv, envp); if( errno == EACCES ) besterr = EACCES; if( errno == ENOMEM || errno == E2BIG || errno == ENOEXEC ) goto out; - brk((char *)pname); + brk(pname); pname = (char *)fname; if(p) *p++ = ':'; path=p;