Skip to content
Permalink
Browse files

[c-host] ensure frames are page aligned

  • Loading branch information
gnif committed Jan 13, 2020
1 parent 0d29527 commit ad8a8b52beb718bd0a3007c485e764092efaf8af
Showing with 4 additions and 2 deletions.
  1. +1 −1 VERSION
  2. +3 −1 c-host/src/app.c
@@ -1 +1 @@
B1-91-g7a96c9fe24+1
B1-92-g0d29527758+1
@@ -27,6 +27,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "common/crash.h"
#include "common/thread.h"
#include "common/ivshmem.h"
#include "common/sysinfo.h"

#include <lgmp/host.h>

@@ -435,7 +436,8 @@ int app_main(int argc, char * argv[])
app.maxFrameSize = ALIGN_DN(lgmpHostMemAvail(app.lgmp) / LGMP_Q_FRAME_LEN);
for(int i = 0; i < LGMP_Q_FRAME_LEN; ++i)
{
if ((status = lgmpHostMemAlloc(app.lgmp, app.maxFrameSize, &app.frameMemory[i])) != LGMP_OK)
const long sz = sysinfo_getPageSize();
if ((status = lgmpHostMemAllocAligned(app.lgmp, app.maxFrameSize, sz, &app.frameMemory[i])) != LGMP_OK)
{
DEBUG_ERROR("lgmpHostMemAlloc Failed (Frame): %s", lgmpStatusString(status));
goto fail;

0 comments on commit ad8a8b5

Please sign in to comment.
You can’t perform that action at this time.