/*
*===============================================================================
*
* d/wilson_d500/memory.c 
*
*-------------------------------------------------------------------------------
*
* Copyright (C) 2006 Thomas Streuer 
*
* This file is part of BQCD -- Berlin Quantum ChromoDynamics program
*
* BQCD is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BQCD is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with BQCD.  If not, see <http:*www.gnu.org/licenses/>.
*
*-------------------------------------------------------------------------------
*/
#include "defs.h"
#include "neighb.h"

double* new_vec()
{
/* #ifndef MESH */
/*   return (double*) malloc(sizeof(double)*24*VOL); */
/* #endif */
  double* m=(double*) malloc(sizeof(double)*24*VOL+64);
  int m2=((int) m)+32;
  m2=m2-(m2%32);
  ((int*) m2)[-1]= (int) m;
  return (double*) m2;
}

void delete_vec(double* v)
{
/* #ifndef MESH */
/*   free(v); */
/* #else */
/*   free(v-24*VOL); */
/* #endif */
}


double* new_gc()
{
  return (double*) malloc(sizeof(double)*18*(4*VOL+tot_bnd_size));
}

void delete_gc(double* v)
{
  free(v);
}

