Skip to content

Commit

Permalink
compiles on Mac OS X 10.14.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanming-hu committed Mar 18, 2019
1 parent 554bc31 commit 1370232
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions external/SPGrid/Core/SPGrid_Utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,15 @@ void Raw_Deallocate(void* data, const size_t size)
//#####################################################################
void Deactivate_Page(void* data, const size_t size)
{
printf("Deactive_Page in SPGrid is no longer supported");
exit(-1);
/*
if(0xfffUL&(uint64_t)data) FATAL_ERROR("Allocated pointer value "+Value_To_String(data)+" is not page-aligned");
int ret=madvise(data,size,MADV_DONTNEED);
if(ret<0){char buffer[256];
char *error_message=strerror_r(errno,buffer,256);
FATAL_ERROR("Failed to deallocate "+Value_To_String(size)+" bytes, ERROR: "+error_message);}
*/
}
//#####################################################################
// Function Check_Address_Resident
Expand Down
2 changes: 1 addition & 1 deletion external/partio/src/io/BGEO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ParticlesDataMutable *readBGEO(const char *filename, const bool headersOnly) {
bool writeBGEO(const char *filename,
const ParticlesData &p,
const bool compressed) {
auto_ptr<ostream> output(
std::unique_ptr<std::ostream> output(
compressed ? Gzip_Out(filename, ios::out | ios::binary)
: new ofstream(filename, ios::out | ios::binary));

Expand Down

0 comments on commit 1370232

Please sign in to comment.