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>2007-11-27 00:30:49 +0300
committerChristopher Faylor <me@cgf.cx>2007-11-27 00:30:49 +0300
commitee4388c4200ed46ebeb8509f6dd204a6476017dc (patch)
tree55fd4f1c7f8e169eb4aad0c646333be0cc2a1da3 /winsup/cygwin/fhandler_proc.cc
parent32cba6cb3a8366df854ba24ece2a60f1b2f872a3 (diff)
Change many cygheap allocation routines to their *_abort analogs.
* cygheap.cc (cmalloc_abort): New function. (crealloc_abort): Ditto. (ccalloc_abort): Ditto.
Diffstat (limited to 'winsup/cygwin/fhandler_proc.cc')
-rw-r--r--winsup/cygwin/fhandler_proc.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
index ce0892eda..608faf5b9 100644
--- a/winsup/cygwin/fhandler_proc.cc
+++ b/winsup/cygwin/fhandler_proc.cc
@@ -357,7 +357,7 @@ fhandler_proc::fill_filebuf ()
bufalloc = strlen (uts_name.sysname) + 1
+ strlen (uts_name.release) + 1
+ strlen (uts_name.version) + 2;
- filebuf = (char *) crealloc (filebuf, bufalloc);
+ filebuf = (char *) crealloc_abort (filebuf, bufalloc);
filesize = __small_sprintf (filebuf, "%s %s %s\n",
uts_name.sysname, uts_name.release,
uts_name.version);
@@ -366,13 +366,13 @@ fhandler_proc::fill_filebuf ()
}
case PROC_UPTIME:
{
- filebuf = (char *) crealloc (filebuf, bufalloc = 80);
+ filebuf = (char *) crealloc_abort (filebuf, bufalloc = 80);
filesize = format_proc_uptime (filebuf, bufalloc);
break;
}
case PROC_STAT:
{
- filebuf = (char *) crealloc (filebuf, bufalloc = 16384);
+ filebuf = (char *) crealloc_abort (filebuf, bufalloc = 16384);
filesize = format_proc_stat (filebuf, bufalloc);
break;
}
@@ -383,32 +383,32 @@ fhandler_proc::fill_filebuf ()
* Windows 95/98/me does have the KERNEL/CPUUsage performance counter
* which is similar.
*/
- filebuf = (char *) crealloc (filebuf, bufalloc = 16);
+ filebuf = (char *) crealloc_abort (filebuf, bufalloc = 16);
filesize = __small_sprintf (filebuf, "%u.%02u %u.%02u %u.%02u\n",
0, 0, 0, 0, 0, 0);
break;
}
case PROC_MEMINFO:
{
- filebuf = (char *) crealloc (filebuf, bufalloc = 2048);
+ filebuf = (char *) crealloc_abort (filebuf, bufalloc = 2048);
filesize = format_proc_meminfo (filebuf, bufalloc);
break;
}
case PROC_CPUINFO:
{
- filebuf = (char *) crealloc (filebuf, bufalloc = 16384);
+ filebuf = (char *) crealloc_abort (filebuf, bufalloc = 16384);
filesize = format_proc_cpuinfo (filebuf, bufalloc);
break;
}
case PROC_PARTITIONS:
{
- filebuf = (char *) crealloc (filebuf, bufalloc = 4096);
+ filebuf = (char *) crealloc_abort (filebuf, bufalloc = 4096);
filesize = format_proc_partitions (filebuf, bufalloc);
break;
}
case PROC_SELF:
{
- filebuf = (char *) crealloc (filebuf, bufalloc = 32);
+ filebuf = (char *) crealloc_abort (filebuf, bufalloc = 32);
filesize = __small_sprintf (filebuf, "%d", getpid ());
}
}