Browse Source

src/datawizard: clarify TODO warnings

Nathalie Furmento 12 years ago
parent
commit
d9d8ff7ae5
2 changed files with 8 additions and 5 deletions
  1. 5 1
      src/datawizard/malloc.c
  2. 3 4
      src/datawizard/memalloc.c

+ 5 - 1
src/datawizard/malloc.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
  * Copyright (C) 2009-2010, 2012  Université de Bordeaux 1
  * Copyright (C) 2009-2010, 2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
  * it under the terms of the GNU Lesser General Public License as published by
@@ -73,6 +73,10 @@ static struct starpu_codelet malloc_pinned_cl =
 
 
 int starpu_malloc(void **A, size_t dim)
 int starpu_malloc(void **A, size_t dim)
 {
 {
+#ifdef STARPU_DEVEL
+#warning TODO: we need to request _starpu_memory_manager_can_allocate_size()
+#endif
+
 	if (STARPU_UNLIKELY(!_starpu_worker_may_perform_blocking_calls()))
 	if (STARPU_UNLIKELY(!_starpu_worker_may_perform_blocking_calls()))
 		return -EDEADLK;
 		return -EDEADLK;
 
 

+ 3 - 4
src/datawizard/memalloc.c

@@ -769,13 +769,12 @@ starpu_allocate_buffer_on_node(uint32_t dst_node, size_t size)
 {
 {
 	uintptr_t addr = 0;
 	uintptr_t addr = 0;
 
 
-	 
-#ifdef STARPU_USE_CUDA  
-	cudaError_t status;  
+#ifdef STARPU_USE_CUDA
+	cudaError_t status;
 #endif
 #endif
 
 
 #ifdef STARPU_DEVEL
 #ifdef STARPU_DEVEL
-#warning TODO: we need to use starpu_malloc
+#warning TODO: we need to use starpu_malloc which should itself inquire from the memory manager is there is enough available memory
 #endif
 #endif
 	switch(starpu_node_get_kind(dst_node))
 	switch(starpu_node_get_kind(dst_node))
 	{
 	{