Author |
Topic: BBC BASIC for SDL 2.0 v0.16a released (Read 2519 times) |
|
DDRM
Global Moderator
member is offline


Posts: 36
|
 |
Re: BBC BASIC for SDL 2.0 v0.16a released
« Reply #17 on: Feb 13th, 2017, 1:02pm » |
|
Hi Richard,
I've found out how to check my memory, and .16d won't run even when there is 1.4GB of RAM free!
However, I downloaded .16e, and that appears to run fine - so thanks for that. I'll let you know if I run into any problems.
Best wishes,
D
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 803
|
 |
Re: BBC BASIC for SDL 2.0 v0.16a released
« Reply #18 on: Feb 13th, 2017, 1:57pm » |
|
on Feb 13th, 2017, 1:02pm, DDRM wrote:| I've found out how to check my memory, and .16d won't run even when there is 1.4GB of RAM free! |
|
It's the old fragmentation problem. It doesn't matter how much memory is free if there isn't a contiguous block big enough to contain BBC BASIC's heap/stack (it attempts to allocate 256 Mbytes). It's a problem on Windows too, but Android has a less sophisticated memory management system so is likely to suffer more.
Quote:| However, I downloaded .16e, and that appears to run fine |
|
It takes more liberties than 0.16d! As I mentioned previously, you can run mmap.bbc (in the tools directory) to get a feel for how fragmented your memory is. If the screen fills with allocations you can tap on it to scroll through more; if that proves to be necessary it gives you an idea of the problem!
Richard.
|
|
Logged
|
|
|
|
DDRM
Global Moderator
member is offline


Posts: 36
|
 |
Re: BBC BASIC for SDL 2.0 v0.16a released
« Reply #19 on: Feb 14th, 2017, 08:34am » |
|
Hmm. Obviously I couldn't run mmap until I had a recent working version. It's certainly a sobering insight into a modern operating system!
I note that you said "reboot" the device. Is that different from turning it off (i.e. power down, not just sleep) and back on? IS there a generic Android way of doing that? I'm guessing that things might then take consecutive blocks of memory, rather than being scattered all over.
I don't really want to put it back to factory defaults, deleting all apps etc...
Best wishes,
D
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 803
|
 |
Re: BBC BASIC for SDL 2.0 v0.16a released
« Reply #20 on: Feb 14th, 2017, 11:28am » |
|
on Feb 14th, 2017, 08:34am, DDRM wrote:| IS there a generic Android way of doing that? |
|
Usually achieved by holding down the on/off button until it prompts you to power it down. The crucial thing is that when you next power up it should take quite a long time, probably initially displaying the Android logo (or the manufacturer's logo if customised) whilst it reboots, so it can't easily be mistaken for waking from sleep.
Mind you the Facebook app regularly crashes so badly that it causes my phone to reboot, so it happens whether I want it to or not!
Quote:| I don't really want to put it back to factory defaults, deleting all apps etc... |
|
No, of course not. That should definitely not be necessary.
If you do have many apps that run automatically at boot-up, because they need to monitor things 'in the background' (and an awful lot of apps seem to think they do) it's unlikely that you can - or would want to - do anything about that.
My Android phone is short of memory and quite often fails to install new apps for that reason, but it's all the 'pre-installed' apps that I don't want, but can't get rid of (other than by 'rooting' it), that are responsible. It's annoying, but presumably the manufacturer gets a lucrative deal from the vendors of those apps in exchange for forcing them on their users.
Richard.
|
|
Logged
|
|
|
|
DDRM
Global Moderator
member is offline


Posts: 36
|
 |
Re: BBC BASIC for SDL 2.0 v0.16a released
« Reply #21 on: Feb 15th, 2017, 08:07am » |
|
OK, thanks - that's what I did, and it still didn't help. I hoped that when it started up "from cold" they'd all take contiguous memory,and leave a nice big chunk at the end for BBCSDL. Anyway, .16e seems to have done the trick!
I have rather few apps installed (by me) - but you're right, there are a ridiculous number that I can't even delete, mostly trying to get me to buy things from the Play store...

D
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 803
|
 |
Re: BBC BASIC for SDL 2.0 v0.16a released
« Reply #22 on: Feb 15th, 2017, 08:17am » |
|
on Feb 15th, 2017, 08:07am, DDRM wrote:| I hoped that when it started up "from cold" they'd all take contiguous memory,and leave a nice big chunk at the end for BBCSDL. |
|
Me too, but the fly in the ointment is quite possibly ASLR (Address Space Layout Randomization) which is a security measure implemented by all modern operating systems:
https://en.wikipedia.org/wiki/Address_space_layout_randomization
Richard.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 803
|
 |
Re: BBC BASIC for SDL 2.0 v0.16a released
« Reply #23 on: Feb 18th, 2017, 5:50pm » |
|
I've discovered a minor bug, which affects only the ARM editions (i.e. Android and Raspberry Pi): INKEY(-10), INKEY(-11) and INKEY(-12), which should detect the mouse buttons, were not working. This is fixed in version 0.16g; there are no other changes.
Richard.
|
|
Logged
|
|
|
|
|