Commit Graph

12 Commits

Author SHA1 Message Date
Vincent Sanders
75018632a9 Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done

@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 18:45:27 +01:00
Chris Young
0bc32aa654 Add more clib2 stats
JSON formatted data can now be saved with ARexx "SLABSTATS stats.json"
2016-11-27 17:10:03 +00:00
Chris Young
4fb38f574a AmigaOS low memory handler attempt 2
Neither freeing slabs nor purging the cache are safe to call from interrupts, so instead we schedule these to run on NetSurf's process.
If NetSurf is busy, there may be significant delay, so the priority is set low to ensure this is called only when other - faster - memory handlers have been exhausted.
I don't know if this works, or is sane, as I'm not entirely sure how to test it.
Something similar needs adding for OS4 but low memory is less of an issue there, so will see if this works on OS3 first.
2016-11-27 16:25:27 +00:00
Chris Young
a76a36915c Ensure the memory for the mem-handler interrupt is allocated 2016-11-27 15:36:30 +00:00
Chris Young
c4b8857789 Add low memory handler to purge unused slabs on OS3
TODO: find some way to purge NetSurf's memory cache safely from another process
2016-11-27 15:31:18 +00:00
Chris Young
d436992eb2 Reduce slab size to 2K as very few allocations are above that. 2016-11-20 17:16:18 +00:00
Chris Young
5ce3b93457 Get clib2 slab usage
Calling ARexx function "SLABSTATS" will dump the current stats to the ns log
2016-11-20 17:12:18 +00:00
Chris Young
17128fd0ad Move ItemPool compatiblity into the header and rename 2016-11-20 16:30:33 +00:00
Chris Young
eab6c0c99e remove ami_misc_allocvec_clear 2016-11-19 21:55:15 +00:00
Chris Young
81a7e0cbe9 Change some AllocVecs to mallocs and FreeVecs to free
Need to be careful with ASPrintf
2016-11-19 17:02:18 +00:00
Chris Young
4b1b79582c Move slab size def into memory.c 2016-11-19 16:12:20 +00:00
Chris Young
6951d2327b Add memory.c/h 2016-11-19 15:51:24 +00:00