Index: /soft/giet_vm/Makefile
===================================================================
--- /soft/giet_vm/Makefile	(revision 373)
+++ /soft/giet_vm/Makefile	(revision 374)
@@ -90,7 +90,10 @@
 
 ### Objects to be linked for game.elf
-GAMEOFLIFE_OBJS = build/gameoflife/main.o \
-                  build/libs/stdio.o      \
-                  build/libs/barrier.o
+GAMEOFLIFE_OBJS = build/gameoflife/main.o    \
+                  build/libs/stdio.o         \
+                  build/libs/barrier.o       \
+                  build/libs/remote_malloc.o \
+                  build/libs/spin_lock.o
+                 
 
 ### Objects to be linked for dhrystone.elf
@@ -104,19 +107,24 @@
 
 ### Objects to be linked for sort.elf
-SORT_OBJS   = build/sort/main.o        \
-              build/libs/stdio.o       \
-              build/libs/spin_lock.o   \
-              build/libs/barrier.o
+SORT_OBJS   = build/sort/main.o          \
+              build/libs/stdio.o         \
+              build/libs/barrier.o       \
+              build/libs/remote_malloc.o \
+              build/libs/spin_lock.o
 
 ### Objects to be linked for transpose.elf
-TRANSPOSE_OBJS = build/transpose/main.o  \
-                 build/libs/stdio.o      \
-                 build/libs/barrier.o
+TRANSPOSE_OBJS = build/transpose/main.o     \
+                 build/libs/stdio.o         \
+                 build/libs/barrier.o       \
+                 build/libs/remote_malloc.o \
+                 build/libs/spin_lock.o
 
 ### Objects to be linked for convol.elf
-CONVOL_OBJS  = build/convol/main.o   \
-               build/libs/stdio.o    \
-               build/libs/stdlib.o    \
-               build/libs/barrier.o
+CONVOL_OBJS  = build/convol/main.o        \
+               build/libs/stdio.o         \
+               build/libs/stdlib.o        \
+               build/libs/barrier.o       \
+               build/libs/remote_malloc.o \
+               build/libs/spin_lock.o
 
 CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 -g -O2
@@ -305,5 +313,6 @@
 	$(CC) $(GIET_INCLUDE) $(CFLAGS)  -c -o $@ $<
 
-### fat32 compilation
+##########################
+### common compilation
 build/fat32/fat32.o: giet_fat32/fat32.c \
                      giet_fat32/fat32.h \
@@ -312,5 +321,4 @@
 	$(CC) $(GIET_INCLUDE) $(CFLAGS)  -c -o $@ $<
 
-### utils compilation
 build/common/utils.o: giet_common/utils.c \
                       giet_common/utils.h \
@@ -319,5 +327,4 @@
 	$(CC) $(GIET_INCLUDE) $(CFLAGS)  -c -o $@ $<
 
-### vmem compilation
 build/common/vmem.o: giet_common/vmem.c \
                      giet_common/vmem.h \
@@ -326,4 +333,5 @@
 	$(CC) $(GIET_INCLUDE) $(CFLAGS)  -c -o $@ $<
 
+########################
 ### boot compilation
 build/boot/boot.elf: $(BOOT_OBJS)            \
@@ -346,4 +354,5 @@
 	$(CC) $(GIET_INCLUDE) $(CFLAGS)  -c -o $@ $<
 
+#########################
 ### kernel compilation
 build/kernel/kernel.elf: $(KERNEL_OBJS)        \
@@ -362,8 +371,6 @@
 	$(CC) $(GIET_INCLUDE) $(CFLAGS)  -c -o $@ $<
 
-
-
-
-### libs compilation
+###########################
+### user libs compilation
 build/libs/stdio.o: giet_libs/stdio.c \
                     giet_libs/stdio.h \
@@ -409,6 +416,17 @@
 	$(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $<
 
-
-### display compilation
+build/libs/remote_malloc.o: giet_libs/remote_malloc.c \
+                            giet_libs/spin_lock.h \
+                            hard_config.h         \
+                            giet_config.h
+	$(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $<
+
+build/libs/sbt_barrier.o: giet_libs/sbt_barrier.c \
+                          hard_config.h         \
+                          giet_config.h
+	$(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $<
+
+########################################
+### display application compilation
 build/display/display.elf: $(DISPLAY_OBJS) display/display.ld hard_config.h
 	$(LD) -o $@ -T display/display.ld $(DISPLAY_OBJS)
@@ -418,4 +436,5 @@
 	$(CC) $(USER_INCLUDE) $(CFLAGS)  -c -o $@ $<
 
+########################################
 ### router compilation
 build/router/router.elf: $(ROUTER_OBJS) router/router.ld hard_config.h
@@ -426,4 +445,5 @@
 	$(CC) $(USER_INCLUDE) $(CFLAGS)  -c -o $@ $<
 
+########################################
 ### hello compilation
 build/hello/hello.elf: $(HELLO_OBJS) hello/hello.ld hard_config.h
@@ -434,4 +454,5 @@
 	$(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $<
 
+########################################
 ### pgcd compilation
 build/pgcd/pgcd.elf: $(PGCD_OBJS) pgcd/pgcd.ld hard_config.h
@@ -442,4 +463,5 @@
 	$(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $<
 
+########################################
 ### gameoflife compilation
 build/gameoflife/gameoflife.elf: $(GAMEOFLIFE_OBJS) gameoflife/gameoflife.ld
@@ -450,4 +472,5 @@
 	$(CC) $(USER_INCLUDE) $(CFLAGS) -O3 -c -o $@ $<
 
+########################################
 ### dhrystone compilation
 build/dhrystone/dhrystone.elf: $(DHRYSTONE_OBJS) dhrystone/dhrystone.ld hard_config.h
@@ -461,4 +484,5 @@
 	$(CC) $(USER_INCLUDE) $(CFLAGS)  -c -o $@ $<
 
+########################################
 ### sort compilation
 build/sort/sort.elf: $(SORT_OBJS) sort/sort.ld hard_config.h 
@@ -469,4 +493,5 @@
 	$(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $<
 
+########################################
 ### transpose compilation
 build/transpose/transpose.elf: $(TRANSPOSE_OBJS) transpose/transpose.ld hard_config.h
@@ -477,4 +502,5 @@
 	$(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $<
 
+########################################
 ### convol compilation
 build/convol/convol.elf: $(CONVOL_OBJS) convol/convol.ld hard_config.h
@@ -485,4 +511,5 @@
 	$(CC) $(USER_INCLUDE) $(CFLAGS) -O0 -c -o $@ $<
 
+########################################
 ### clean 
 clean:
Index: /soft/giet_vm/giet_config.h
===================================================================
--- /soft/giet_vm/giet_config.h	(revision 373)
+++ /soft/giet_vm/giet_config.h	(revision 374)
@@ -30,4 +30,6 @@
 #define GIET_DEBUG_DMA_DRIVER    0          /* trace DMA accesses */
 #define GIET_DEBUG_FBF_DRIVER    0          /* trace FBF accesses */
+#define GIET_DEBUG_MALLOC        0          /* trace remote_malloc library */
+#define GIET_DEBUG_SBT           0          /* trace SBT barrier library */
 
 #define CONFIG_SRL_VERBOSITY TRACE 
