[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Re: [PATCH 0 of 2 V5] libxc: checkpoint compression
On Tue, 2011-11-08 at 19:41 +0000, Shriram Rajagopalan wrote: > One alternative would be to add the xc_memalign function alone, that > was removed by c/s 22520. 22520 is 22520:6df91a11dcb0 "libxc: remove comment obsoleted by addition of hypercall bounce buffer." here. Did you mean 22312:9fad5e5e2fc1 (remember the cset number is not globally unique/stable, only the longer node hash is) I think putting xc_memalign back would be fine, better than the other options we've discussed even. I'd be tempted to do it as separate functions tools/libxc/xc_{minios,netbsd,linux}.c rather than using #ifdef though. (For my money you can ignore Solaris, it's been unmaintained for long enough that I bet it doesn't even build now and there's no one we can ask to even build test it). > > -void *xc_memalign(size_t alignment, size_t size) > -{ > -#if defined(_POSIX_C_SOURCE) && !defined(__sun__) > - int ret; > - void *ptr; > - ret = posix_memalign(&ptr, alignment, size); > - if (ret != 0) > - return NULL; > - return ptr; > -#elif defined(__NetBSD__) || defined(__OpenBSD__) > - return valloc(size); > -#else > - return memalign(alignment, size); > -#endif > -} > - > > shriram > > > > > > thanks > > shriram > > > > > > Ian. > > > > > > > > shriram > > > > > > > > > > > > Ping. > > > > > > > > > On Fri, Nov 4, 2011 at 5:14 AM, > Ian Jackson > > > <Ian.Jackson@xxxxxxxxxxxxx> wrote: > > > rshriram@xxxxxxxxx writes > ("[PATCH 0 of 2 > > V5] libxc: > > > checkpoint compression"): > > > > This patch series adds > checkpoint > > compression > > > functionality, while > > > > running under Remus. > > > > > > ... > > > > Changes since last > version: > > > > 1. use posix_memalign > only on linux > > platforms and > > > switch to normal malloc > for > > > > the rest. stubdom > compiles > > successfully. > > > > > > > > > Looking at this in more > detail, I don't > > understand why > > > you're using > > > posix_memalign rather than > just malloc, > > anyway. If > > > it's necessary to > > > use posix_memalign on > Linux, why is it OK to > > use > > > malloc on other > > > platforms ? > > > > > > Also this #ifdef is quite > ugly. > > > > > > Ian. > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |