From: Christian Heinrich Date: Fri, 17 Jun 2016 08:46:39 +0000 (+0200) Subject: [XBT] Add/fix some comments in memory_map.cpp X-Git-Tag: v3_14~976^2~1 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d17c4984cc6f7ed55cd3f89b060144570f7cbbe9 [XBT] Add/fix some comments in memory_map.cpp --- diff --git a/src/xbt/memory_map.cpp b/src/xbt/memory_map.cpp index 825393a2b8..d9092a25db 100644 --- a/src/xbt/memory_map.cpp +++ b/src/xbt/memory_map.cpp @@ -54,13 +54,17 @@ XBT_PRIVATE std::vector get_memory_map(pid_t pid) char* line = nullptr; std::size_t n = 0; /* Amount of bytes to read by xbt_getline */ while ((read = xbt_getline(&line, &n, fp)) != -1) { + /** + * The lines that we read have this format: (This is just an example) + * 00602000-00603000 rw-p 00002000 00:28 1837264 + */ //fprintf(stderr,"%s", line); /* Wipeout the new line character */ line[read - 1] = '\0'; - /* Tokenize the line using spaces as delimiters and store each token in lfields array. We expect 5 tokens/fields */ + /* Tokenize the line using spaces as delimiters and store each token in lfields array. We expect 5 tokens for 6 fields */ char* lfields[6]; lfields[0] = strtok(line, " ");