author | Tinku Mannan <tmannan@ti.com> | |
Tue, 14 Jan 2014 16:16:15 +0000 (11:16 -0500) | ||
committer | Tinku Mannan <tmannan@ti.com> | |
Tue, 14 Jan 2014 16:16:15 +0000 (11:16 -0500) |
1 | 2 | |||
---|---|---|---|---|
ti/runtime/hplib/build/Makefile | patch | | diff1 | | diff2 | | blob | history |
ti/runtime/hplib/src/hplib_vm.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc ti/runtime/hplib/build/Makefile
index 9eff107e04a36555de23d98510e3cf19d0ff9751,d44fbc47ec154d4133ecb9685b5d7b05aa54a87b..262aee7d293c4878cace69a59afd824d8bc62984
tim64.c \
timlist.c
- ifneq ($(DISABLE_OSAL), yes)
- COMMONSRCC += osal.c
- endif
+ #ifneq ($(DISABLE_OSAL), yes)
+ #COMMONSRCC += osal.c
+ #endif
-CSL_DEVICE ?= -DDEVICE_K2H
-
-CFLAGS+= $(DEBUG_FLAG) -I. -I $(SRCDIR) -I$(PDK_INSTALL_PATH) -I$(TRANS_SDK_INSTALL_PATH) -I$(CPPI_INC_DIR) $(CSL_DEVICE) -D__LINUX_USER_SPACE -pthread -D _GNU_SOURCE -DPDK_VERSION=$(PDK_VERSION)
+CFLAGS+= $(DEBUG_FLAG) -I. -I $(SRCDIR) -I$(PDK_INSTALL_PATH) -I$(TRANS_SDK_INSTALL_PATH) -I$(CPPI_INC_DIR) -D__LINUX_USER_SPACE -pthread -D _GNU_SOURCE -DPDK_VERSION=$(PDK_VERSION)
# Make Rule for the COMMONSRC Files
diff --cc ti/runtime/hplib/src/hplib_vm.c
index 62239a8ca450a4b63900cc69e5b6abe0a49aecfc,d3fdaa30350da9d3b0718c76419533ec91b22415..34ea2fc5a8282b522b34e1e16f18468a26951626
return p_block;
Osal_hplibCsEnter();
- align_offset = (uint32_t)(memPoolAddr[poolId].memStart +
++
+ alloc_ptr = align_offset = (uint32_t)(memPoolAddr[poolId].memStart +
memPoolAddr[poolId].memPoolHdr->virtMemAllocOffset);
- alloc_ptr = (uint8_t*)align(align_offset, alignment);
-
+ if(alignment > 1)
+ {
+ alloc_ptr = (uint8_t*)align(align_offset, alignment);
+ }
++
if ((alloc_ptr + size) < memPoolAddr[poolId].memEnd)
{
p_block =(void *)alloc_ptr;