Skip to content

Commit

Permalink
Merge pull request ARMmbed#2133 from ARMmbed/few_updates
Browse files Browse the repository at this point in the history
Adjust GC thresholds and unittests
  • Loading branch information
Arto Kinnunen authored Aug 1, 2019
2 parents 26166d1 + 1da0b9f commit 72b065b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ $(TESTDIRS):

$(CLEANTESTDIRS):
@make -C $(@:clean-%=%) clean
@rm -fr results

.PHONY: release
release:
Expand Down
5 changes: 2 additions & 3 deletions source/Core/ns_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ typedef enum {
NS_MONITOR_STATE_GC_CRITICAL
} ns_monitor_state_e;

#define HEAP_HIGH_WATERWARK (0.80) /* Heap usage HIGH threshold */
#define HEAP_CRITICAL_WATERMARK (0.90) /* Heap usage CRITICAL threshold */
#define HEAP_HIGH_WATERWARK (0.95) /* Heap usage HIGH threshold */
#define HEAP_CRITICAL_WATERMARK (0.99) /* Heap usage CRITICAL threshold */

#define NS_MAINTENANCE_TIMER_INTERVAL 10 // Maintenance interval

Expand Down Expand Up @@ -144,7 +144,6 @@ int ns_monitor_init(void)
ns_monitor_ptr->ns_monitor_heap_gc_state = NS_MONITOR_STATE_HEAP_GC_IDLE;
ns_monitor_ptr->ns_maintenance_timer = 0;
ns_monitor_ptr->prev_heap_alloc_fail_cnt = 0;
tr_debug("Monitor init high:%lu, critical:%lu total:%lu", (unsigned long)ns_monitor_ptr->heap_high_watermark, (unsigned long)ns_monitor_ptr->heap_critical_watermark, (unsigned long)ns_monitor_ptr->mem_stats->heap_sector_size);
return 0;
}

Expand Down
22 changes: 8 additions & 14 deletions test/nanostack/unittest/thread/nvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,13 @@ TEST_SRC_FILES = \

include ../../MakefileWorker.mk

CLEAN-DIRS := $(foreach dir,$(DIRS),clean-$(dir))
clean: $(CLEAN-DIRS)
rm -rf stub/*gcov stub/*gcda stubs/*o
rm -rf results/*
rm -rf coverages/*
rm -rf results
rm -rf coverages
rm -rf lib/*
rm -rf objs/*
rm -f /tmp/fd.txt
clean:
rm -f f_d
rm -f s_d
rm -f cpputest_thread_nvm_store.xml
rm -f thread_nvm_store_unit_tests
rm -f thread_nvm_store_unit_tests
rm -f thread_nvm_store_unit_tests.txt

.PHONY: $(CLEAN-DIRS)
$(CLEAN-DIRS):
make -C $(subst clean-,,$@) clean
CPPUTESTFLAGS += -DFEA_TRACE_SUPPORT -DHAVE_THREAD

CPPUTESTFLAGS += -DFEA_TRACE_SUPPORT -DHAVE_THREAD=1

0 comments on commit 72b065b

Please sign in to comment.