Browse Source

Make _starpu_memchunk_tidy available to the application

Samuel Thibault 10 years ago
parent
commit
3937eb658e
4 changed files with 4 additions and 4 deletions
  1. 3 0
      include/starpu_data.h
  2. 0 2
      src/datawizard/datawizard.c
  3. 1 1
      src/datawizard/memalloc.c
  4. 0 1
      src/datawizard/memalloc.h

+ 3 - 0
include/starpu_data.h

@@ -129,6 +129,9 @@ struct starpu_data_interface_ops* starpu_data_get_interface_ops(starpu_data_hand
 
 
 unsigned starpu_data_test_if_allocated_on_node(starpu_data_handle_t handle, unsigned memory_node);
 unsigned starpu_data_test_if_allocated_on_node(starpu_data_handle_t handle, unsigned memory_node);
 
 
+void starpu_memchunk_tidy(unsigned memory_node);
+
+
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif

+ 0 - 2
src/datawizard/datawizard.c

@@ -34,8 +34,6 @@ int __starpu_datawizard_progress(unsigned memory_node, unsigned may_alloc, unsig
 #endif
 #endif
 	STARPU_UYIELD();
 	STARPU_UYIELD();
 
 
-	_starpu_memchunk_tidy(memory_node);
-
 	/* in case some other driver requested data */
 	/* in case some other driver requested data */
 	if (_starpu_handle_pending_node_data_requests(memory_node))
 	if (_starpu_handle_pending_node_data_requests(memory_node))
 		ret = 1;
 		ret = 1;

+ 1 - 1
src/datawizard/memalloc.c

@@ -741,7 +741,7 @@ size_t _starpu_free_all_automatically_allocated_buffers(unsigned node)
 }
 }
 
 
 /* Periodic tidy of available memory  */
 /* Periodic tidy of available memory  */
-void _starpu_memchunk_tidy(unsigned node)
+void starpu_memchunk_tidy(unsigned node)
 {
 {
 	starpu_ssize_t total = starpu_memory_get_total(node);
 	starpu_ssize_t total = starpu_memory_get_total(node);
 	starpu_ssize_t available = starpu_memory_get_available(node);
 	starpu_ssize_t available = starpu_memory_get_available(node);

+ 0 - 1
src/datawizard/memalloc.h

@@ -65,7 +65,6 @@ void _starpu_deinit_mem_chunk_lists(void);
 void _starpu_request_mem_chunk_removal(starpu_data_handle_t handle, struct _starpu_data_replicate *replicate, unsigned node, size_t size);
 void _starpu_request_mem_chunk_removal(starpu_data_handle_t handle, struct _starpu_data_replicate *replicate, unsigned node, size_t size);
 int _starpu_allocate_memory_on_node(starpu_data_handle_t handle, struct _starpu_data_replicate *replicate, unsigned is_prefetch);
 int _starpu_allocate_memory_on_node(starpu_data_handle_t handle, struct _starpu_data_replicate *replicate, unsigned is_prefetch);
 size_t _starpu_free_all_automatically_allocated_buffers(unsigned node);
 size_t _starpu_free_all_automatically_allocated_buffers(unsigned node);
-void _starpu_memchunk_tidy(unsigned node);
 void _starpu_memchunk_recently_used(struct _starpu_mem_chunk *mc, unsigned node);
 void _starpu_memchunk_recently_used(struct _starpu_mem_chunk *mc, unsigned node);
 
 
 void _starpu_display_memory_stats_by_node(int node);
 void _starpu_display_memory_stats_by_node(int node);