View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000672 | LDMud | Other | public | 2009-09-16 02:58 | 2009-09-16 14:16 |
Reporter | _xtian_ | Assigned To | zesstra | ||
Priority | normal | Severity | tweak | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Summary | 0000672: [PATCH] "status malloc": output the mem allocator type | ||||
Description | Trivial patch to output the name of the used allocator on "status malloc" for the other 3 allocators that don't already do this. | ||||
Tags | No tags attached. | ||||
Attached Files | output_xalloctype.patch (1,554 bytes)
Index: src/slaballoc.c =================================================================== --- src/slaballoc.c (revision 2714) +++ src/slaballoc.c (working copy) @@ -931,6 +931,7 @@ # define dump_stat(str,stat) strbuf_addf(sbuf, str,stat.counter,stat.size) + strbuf_add(sbuf, "Using LDMUD slaballoc.\n"); strbuf_add(sbuf, "Type Count Space (bytes)\n"); dump_stat("xallocs: %8lu %10lu\n\n", xalloc_st); dump_stat("sbrk requests: %8lu %10lu (a)\n",sbrk_st); Index: src/smalloc.c =================================================================== --- src/smalloc.c (revision 2714) +++ src/smalloc.c (working copy) @@ -828,6 +828,7 @@ # define dump_stat(str,stat) strbuf_addf(sbuf, str,stat.counter,stat.size) + strbuf_add(sbuf, "Using LDMUD smalloc.\n"); strbuf_add(sbuf, "Type Count Space (bytes)\n"); dump_stat("xallocs: %8lu %10lu\n\n", xalloc_st); dump_stat("sbrk requests: %8lu %10lu (a)\n",sbrk_st); Index: src/xptmalloc.c =================================================================== --- src/xptmalloc.c (revision 2714) +++ src/xptmalloc.c (working copy) @@ -124,6 +124,7 @@ # define dump_stat(str,member) strbuf_addf(sbuf, str, stats.member) + strbuf_add(sbuf, "Using LDMUD xptmalloc.\n"); strbuf_add(sbuf, "Type Amount\n"); dump_stat("total non-mmaped: %8d bytes\n", arena); dump_stat("number of free chunks: %8d\n", ordblks); | ||||
External Data (URL) | |||||
|
Ah, this clashes somewhat with our plan to remove commands like status from the driver (see 0000165). ;-) Comments? |
|
discard it, if you want, no worries. It was just 2mins. My incentive was to detect the active allocator at runtime (from inside the mud). There seems to also be a debug_info(6,2) to get this. But including it in status malloc was more agreeable. |
|
Ok, it is a quite small patch. I don't mind to apply it, even if we remove status soon (in 3.3.x status will anyway be available until that branch is not supported anymore). |
|
Applied in r2745 and r2745. Thanks. ;-) |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-09-16 02:58 | _xtian_ | New Issue | |
2009-09-16 02:58 | _xtian_ | File Added: output_xalloctype.patch | |
2009-09-16 03:40 | zesstra | Note Added: 0001266 | |
2009-09-16 03:40 | zesstra | Relationship added | related to 0000165 |
2009-09-16 05:07 | _xtian_ | Note Added: 0001267 | |
2009-09-16 07:43 | zesstra | Note Added: 0001270 | |
2009-09-16 07:43 | zesstra | Assigned To | => zesstra |
2009-09-16 07:43 | zesstra | Status | new => assigned |
2009-09-16 14:16 | zesstra | Note Added: 0001272 | |
2009-09-16 14:16 | zesstra | Status | assigned => resolved |
2009-09-16 14:16 | zesstra | Fixed in Version | => 3.3.719 |
2009-09-16 14:16 | zesstra | Resolution | open => fixed |