[memprof: 34/76] some other minor changes, mostly guint -> gsize's
- From: Holger Hans Peter Freyther <hfreyther src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [memprof: 34/76] some other minor changes, mostly guint -> gsize's
- Date: Sun, 13 Jun 2010 03:41:05 +0000 (UTC)
commit 4fa7c303bf4a192c533db9d970c6929b0f27004a
Author: Cristi Magherusan <majeru atheme org>
Date: Thu Jan 24 03:31:29 2008 +0200
some other minor changes, mostly guint -> gsize's
Slightly tweaked to fix warnings
lib/intercept.c | 2 +-
src/leakdetect.c | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/lib/intercept.c b/lib/intercept.c
index e9ce91a..ca01137 100644
--- a/lib/intercept.c
+++ b/lib/intercept.c
@@ -349,7 +349,7 @@ mi_write_stack (int n_frames,
ThreadInfo *thread;
int old_errno = errno;
- if (n_frames < 0)
+ if (n_frames < 0 || n_frames > 20000)
{
MI_DEBUG (("mi_write_stack - elide bogus foo\n"));
return;
diff --git a/src/leakdetect.c b/src/leakdetect.c
index 87d25d1..fb8d80b 100644
--- a/src/leakdetect.c
+++ b/src/leakdetect.c
@@ -57,7 +57,7 @@ compare_blocks (const void *a, const void *b)
}
static gboolean
-read_proc_stat (int pid, char *status, guint *start_stack, guint *end_stack)
+read_proc_stat (int pid, char *status, gsize *start_stack, gsize *end_stack)
{
gchar *fname;
gulong tstart_stack;
@@ -161,7 +161,7 @@ read_stack_maps (MPProcess *process)
FILE *in;
gchar perms[26];
gchar file[256];
- guint start, end, major, minor, inode;
+ gsize start, end, major, minor, inode;
snprintf (buffer, 1023, "/proc/%d/maps", process->pid);
@@ -197,7 +197,7 @@ add_stack_root (MPProcess *process, GSList *block_list,
GList *map_list)
{
GList *tmp_list;
- guint start_stack, end_stack;
+ gsize start_stack, end_stack;
tmp_list = map_list;
@@ -345,9 +345,9 @@ scan_block (pid_t pid, int memfd, GSList *block_list,
GPtrArray *block_arr, Block *block)
{
void **mem;
- gint i;
+ gsize i;
void *addr;
- size_t length = (block->size + 3) / 4;
+ gsize length = (block->size + 3) / 4;
addr = g_new (void *, length);
mem = (void **)addr;
@@ -358,7 +358,7 @@ scan_block (pid_t pid, int memfd, GSList *block_list,
&mem[i]);
if (errno)
{
- g_warning ("Cannot read word %d/%d in block %p: %s\n",
+ g_warning ("Cannot read word %zd/%zd in block %p: %s\n",
i, length, block->addr, g_strerror (errno));
g_free (addr);
return block_list;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]