The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Interesting. It wouldn't allow me to benchmark though, so I'm not sure how well i could test my code. The point of it is to speed up my processor on apple machines. I want to be sure that is working. on an emulator i'm not sure i could be. plus i thought xamarin was managed stuff.
Sure. mmap() and munmap() are POSIX standard calls, so any of the *BSD variants should work. FreeBSD and OpenBSD use clang as the default compiler. Since these are POSIX calls, they should work the same on any POSIX compliant system, including Linux. They're certainly available in glibc-2.3 (circa 2002). You could install clang on your Linux distribution, but since mmap() and munmap() are provided by libc, changing the compiler should not affect the availability or behaviour of the calls.
Well, forget Darwin in a VM, I think. It would seem that "official" darwin iso's are no longer available. There is PureDarwin, but that's still in beta, though it's supposed to be a downstream version of Apple-Darwin.
It looks like you may have solved your issue with MacInCloud. But you might be able to shorten the time you need to rent there by installing a FreeBSD instance in a VM and doing 99.9% of conformance testing there, then do the final bit on MacInClout.
That's a good idea, but I probably don't need to do it. From the looks of it, apple and linux use the same, or nearly the same calls, so i think i might have to copy, paste compile, remove the pasted bit and update my #if defined(__linux__) to be #if defined(__linux__) || defined(_APPLE_) or whatever. That's the hope anyway, but I won't know for sure until i compile it on an apple machine.
#if defined( _WIN64 ) || defined( _WIN32 )
// do windows stuff#else if defined( <arduino def>)
// do arduino stuff#else
// assume POSIX#endif
That assumes that anything not Windows or arduino is POSIX, of course. And, as noted above, the mmap calls go back to almost 20 years, so anything that is anything unixish and is less that that old probably supports mmap() munmap().
Of course, if that doesn't float your boat, in the CONFORMING TO section of the mmap man page it states
On POSIX systems on which mmap(), msync(2), and munmap() are available, _POSIX_MAPPED_FILES is defined in <unistd.h> to a
value greater than 0.
So that might be the best way to go. I've confirmed the presence of _POSIX_MAPPED_FILES in unistd.h in FreeBSD, NetBSD, OpenBSD and even the oldest Linux I can find, e.g. RedHat 5 (Manhattan (c)1997, not RHEL-5)
Actually, Apple machines need not be so expensive. You can buy them on Amazon for a mere $20[^]
Anything that is unrelated to elephants is irrelephant Anonymous - The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 - Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
My policy has always been to not give Apple any money, ever.
I've worked around my own policy a few years ago by buying a used Mac. Strictly speaking, they still haven't seen a single penny from me, unless the person I bought it from somehow decided to send them part of my purchase amount.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
I think with that new processor they have I'll see some using my library.
Besides, my library supports several exotic architectures. Even some 8-bit ones, and while it will compile and run on Apple right now (*knock on wood*) i can make it 5x to 6x faster by implementing two almost trivial functions.
Ok so it started thus
Yesterday I was prompted by iTunes to update my iPhone to the latest and greatest , I duly clicked yes ( my first mistake ) the update failed part way through and I opted to reset to factory default ( my second mistake ) it on rebooting told me to enter my apple id and password and then told me they or it was incorrect ( they weren't) I then entered into an endless loop of password reset bullshit, In desperation I rang apple customer service ( my third mistake) they told me I would have to wait 24 hours to unlock my account as it had an activation lock - I waited 24 hour to be told by iforgot.apple.com I couldn't reset my password until the 31st of Jan 2021 - WTF ? despite my protests I got nowhere - so I have no usable phone and no redress - to make things worse I contacted my provider Vodafone who informed me I needed to contact apple or pay a fee if I wanted a replacement phone - I feel totally alone in this - anyone had a similar experience ?
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP