Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-09-01 02:02:15 +0400
committerChristopher Faylor <me@cgf.cx>2003-09-01 02:02:15 +0400
commitedf16a29fc6841a30c5cf69bacd7a1e6add77163 (patch)
tree8d9cf3d8bd154673d028747dbfee7da55e3a283a /winsup/cygwin/heap.cc
parentf8e2f358c498417f044e17a5977cc796159bba95 (diff)
* net.cc (free_char_list): Delete.
(dup_addr_list): Delete. (dup_char_list): Delete. (free_hostent_ptr): Delete. (free_protoent_ptr): Delete. (free_servent_ptr): Delete. (DWORD_round): New function. (strlen_round): New function. Returns strlen rounded up to word size. (dup_ent): New, generic function to duplicate a {host,proto,serv}ent structure. (gen_ent): New macro. Generates a generic dup_{host,proto,serv}ent_ptr function. (cygwin_getservbyname): Remove call to free_servent_ptr, pass servent_buf to dup_servent_ptr. (cygwin_getservbyport): Ditto. (cygwin_gethostbyname): Ditto for hostent. (cygwin_gethostbyaddr): Ditto. (cygwin_getprotobyname): Ditto for protoent. (cygwin_getprotobynumber): Ditto.
Diffstat (limited to 'winsup/cygwin/heap.cc')
-rw-r--r--winsup/cygwin/heap.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc
index 95fdd12eb..5157a564d 100644
--- a/winsup/cygwin/heap.cc
+++ b/winsup/cygwin/heap.cc
@@ -139,7 +139,6 @@ sbrk (int n)
/* Couldn't allocate memory. Maybe we can reserve some more.
Reserve either the maximum of the standard cygwin_shared->heap_chunk_size ()
or the requested amount. Then attempt to actually allocate it. */
-
if ((newbrksize = cygheap->user_heap.chunk) < commitbytes)
newbrksize = commitbytes;
@@ -147,7 +146,7 @@ sbrk (int n)
|| VirtualAlloc (cygheap->user_heap.top, newbrksize = commitbytes, MEM_RESERVE, PAGE_NOACCESS))
&& VirtualAlloc (cygheap->user_heap.top, commitbytes, MEM_COMMIT, PAGE_READWRITE) != NULL)
{
- (char *) cygheap->user_heap.max += newbrksize;
+ (char *) cygheap->user_heap.max += pround (newbrksize);
goto good;
}