Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile on OSX #12

Merged
merged 2 commits into from
Dec 11, 2014
Merged

Compile on OSX #12

merged 2 commits into from
Dec 11, 2014

Conversation

akhenakh
Copy link
Contributor

@akhenakh akhenakh commented Dec 9, 2014

Probably not tested enough but compiles and seems to work

@bvernoux
Copy link
Member

Hi Fabrice,

Thanks for this pull
But in file "libairspy/src/iqconverter_float.c and iqconverter_float.c" the line "define _aligned_malloc(size, alignment) malloc(size)" does not use alignment parameter and it will have issues on MacOS (even if today it probably work fine), could you check if there is not a special API (for MacOS) with size & alignment as parameter ? (like for linux memalign(alignment, size))

Thanks for your work

Best Regards
Benjamin

@akhenakh
Copy link
Contributor Author

As the malloc page states :

 The malloc(), calloc(), valloc(), realloc(), and reallocf() functions
 allocate memory.  The allocated memory is aligned such that it can be
 used for any data type, including AltiVec- and SSE-related types.  The
 free() function frees allocations that were created via the preceding
 allocation functions.

"Mac OS X does have 16 Byte memory alignment in the ABI. You should not need to use memalign(). If you memory requirements are a factor of 16 then I would not implement it and maybe just add an assert."

bvernoux added a commit that referenced this pull request Dec 11, 2014
@bvernoux bvernoux merged commit 5997b1b into airspy:master Dec 11, 2014
@bvernoux
Copy link
Member

Ok thanks for the MacOS support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants