Forums › SM Series Discussions › Meaning of smAllocationErr
- This topic has 6 replies, 2 voices, and was last updated 2 years, 11 months ago by
Andrew.
- AuthorPosts
jmatusiakParticipant- This topic was modified 2 years, 11 months ago by
jmatusiak.
While playing with the SM200C sweep parameter values, I am trying to learn how to make sure that I can keep a user from doing something stupid.
I was randomly jamming in values and trying to make things break and was able to consistently do it with the following parameters:
start freq: 2.3GHz
stop freq: 2.7GHz
rbw/vbw: 200kHz
period 100msWhen I attempted to kick things off, I get an error of -13 (smAllocationErr). I guess I am confused as why that would be. I can go from 900kHz – 6GHz with 100kHz rbw/vbw with no issues.
So why is the above setup an “allocation” problem? In my mind I assumed that that meant the SH couldn’t gather enough resources, but that setup should be orders of magnitude easier. I can only imagine that I am misinterpreting something, but the API documents don’t go into a lot of detail for what the error means or for limits that I might be hitting with my params.
If I change the rbw to 100kHz, it works fine (which should take twice as much resources, hence why I am guessing I don’t understand the error).
AndrewModerator- This reply was modified 2 years, 11 months ago by
Andrew.
The allocation error indicates we failed to allocate memory at some point during the configuration. Usually the result of malloc failing. You can see this more often when using the 32-bit version of the API since memory allocation limit is lower.
Is it possible you were passing 200Hz instead of 200kHz as the RBW, or something similar?
Are you using the 32-bit API? If yes, is it possible your own allocated memory was high enough that our API couldn’t stay within the 32-bit limitations?
That being said, its certainly possible this is a bug and a specific combination of settings produces this error code. If you can provide a simple code example that reproduces the problem including information about your OS and what API version you are using, I can try to reproduce it. I was unable to reproduce the issue just based on the information you provided.
Andrew
jmatusiakParticipant
jmatusiakParticipantOK, I think I see my issue. When I initialized my device, I was setting the vbw to be what the rbw was. I then changed the rbw and kicked things off. The vbw wasn’t getting updated, so when I set the SweepCoupling to use the new rbw (200kHz now), but had the old vbw (100kHz), it caused the allocation error.
Dumb question, How do I know if I am using the 32b API or not? I haven’t seen this distinction anywhere.
AndrewModerator- This reply was modified 2 years, 11 months ago by
Andrew.
Thanks for the update.
You would have copied the 32-bit API from the x86 folder in our SDK. Also if your application is 32-bit, then you are using the 32-bit API.
Andrew
jmatusiakParticipantI see the confusion. I am working in Linux, it doesn’t look like you offer both 32-bit AND 64-bit. I think you only offer a 64-bit version, right?
libsm_api.so.2.1.17: ELF 64-bit LSB shared object
AndrewModerator- This reply was modified 2 years, 11 months ago by
Andrew.
That’s correct. We only offer 64-bit builds on Linux.
- This topic was modified 2 years, 11 months ago by
- AuthorPosts
You must be logged in to reply to this topic.