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

frequency:deallocate(F) creates duplicates and inserts non-allocatable frequencies #1

Open
lbolla opened this issue Jun 16, 2016 · 0 comments

Comments

@lbolla
Copy link

lbolla commented Jun 16, 2016

frequency:deallocate does not care what the allocatable frequencies are and happily inserts non-allocatable frequencies in the "allocatable" list, even duplicating them.

Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V7.3  (abort with ^G)
1> c(frequency).
frequency.erl:4: Warning: undefined callback function code_change/3 (behaviour 'gen_server')
{ok,frequency}
2> frequency:start().
{ok,<0.41.0>}
3> l(sys).
{module,sys}
4> sys:statistics(frequency, true).
ok
5> sys:get_state(frequency).
{[10,11,12,13,14,15],[]}
6> frequency:deallocate(999).
ok
7> sys:get_state(frequency). 
{[999,10,11,12,13,14,15],[]}
8> frequency:deallocate(10). 
ok
9> sys:get_state(frequency).
{[10,999,10,11,12,13,14,15],[]}
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

No branches or pull requests

1 participant