Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Memory Management And The Log

Featured Replies

The log keeps far too many messages, leaving your memory usage running wild.

hKZQyrq.png

There should be a limit to the number of messages kept.

Also for developers, use the log sparingly or for debug purposes. Remove unnecessary logs when releasing.

Edited by beef

I seriously doubt its the bot, look at the script. Lets so some very rough calculations:

 

- The bot (when fully loaded, and in game) takes about 400 K RAM ==> 4.096E8 bytes.

- A basic scripts (if properly coded) should, I'll give 25 K RAM:  ==> 2.56E7 bytes.

- Your RAM usage: 1,780,000 K ==> 1.83E9 bytes.

 

- Missing Memory usage ( 'Logs' ) ==> Total memory usage - Bot memory usage - Script memory usage ==> 1.83E9 - 4.096E8 -  2.56E7 ==> 1.395E9 bytes.

 

So in your theory, keeping in mind this is obviously very in-accurate, but you'll see by point.

 

A formula: http://www.javamex.com/tutorials/memory/string_memory_usage.shtml

- Minimal String Memory Usage (Bytes) = 8 * ((( Chars * 2) + 45)  / 8)

 

Thus meaning if we make all your logs one big string:

 

8 * ((( Chars * 2) + 45)  / 8) = 1.395E9 bytes. (our 'string' memory usage)

 

Which is roughly saying (with such a scale, not rounding to the next divisible of 8) the total memory usage divide by two would equal the number of chars?

 

So, 1.395E9 / 2 ==> 6.975E8 chars ==> 697,500,000 chars. Wozers.

 

That's a LOT of logging. Which is why I think it's not quite the logging, but more of the physical script and it not properly recycling and letting the GC do its good work.

Edited by Brainfree

Love your calculation, not sure if it's correct tho.

 

Anyway, the staff is working toward a bot that runs smoother, and every little bit should help.

 

So they should add a maximum of 50 logs.

Or flush the logs every 5 minutes or so.

  • Author

Perhaps it's not all the log, but it is a contributor. There must be other memory leaks.

The log does store indefinately though until you hit a max array value. Ask me how I know ;)

My Linux Beast doesn't simply run out of memory.

Edited by XenoTools

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.