Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6318573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:39:12+00:00 2026-05-24T15:39:12+00:00

public class Players { public int GUID { get; set; } public string Name

  • 0
public class Players
{
    public int GUID { get; set; }
    public string Name { get; set; }
    public string Country { get; set; }
    public Clans Clan { get; set; }

    public PlayerType Type { get; set; }
    public Groups Access { get; set; }
    public int Level { get; set; }
    public int RoomID { get; set; }

    public IPAddress IP { get; set; }
    public bool IsPlaying { get; set; }
    public bool IsProtected { get; set; }
    public bool IsBanned { get; set; }
    public bool IsInvisible { get; set; }

    public bool IsOnline()
    {
        return (IPAddress.Parse("0.0.0.0").Equals(this.ExtIP)) ? false : true;
    }

    public string GetIP()
    {
        return this.ExtIP.ToString();
    }
}

I have a list that uses the above class and I would like to know how could I keep track of how much memory that list is taking for each new user added or each change made to any user already on it or how to calculate it (if possible explained in an easy maner was never good a math hehe) ?

If there is a simple code that could show me that once the list is updated or a new entry goes in/out I would appreciate as well.

This application runs on linux under mono and uses MySQL as database, I was relying a lot on the database and since I run it on a VPS it was consuming a lot of cpu/memory.

In order to optimize it I am considering loading some data on startup and manage updates every X minutes and only update instantly important data instead of querying the database for most information I need to use.

To start that up I would like to understand a bit more on how I could monitor memory usage and the sorts of lists I have or can use for this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T15:39:13+00:00Added an answer on May 24, 2026 at 3:39 pm

    You could use the GC.GetTotalMemory() Method to log a snapshot point-in-time memory usage:

    // Measure starting point memory use
    GCMemStart = System.GC.GetTotalMemory(true);
    
    // Perform allocations
    
    GCMemEnd = System.GC.GetTotalMemory(true);
    

    [If the forceFullCollection parameter is true, this method waits a
    short interval before returning while the system collects garbage and
    finalizes objects]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

public class Address { public string ZipCode {get; set;} } public class Customer {
Here is my model public class Horse { public int HorseId { get; set;
public class Options { public FolderOption FolderOption { set; get; } public Options() {
import java.util.Scanner; public class Game { private String startYorN; private int generateTestValues; private int
I have a class containing two properties: public class player{ public player(String playerName,int points){
public class MyClass { public int Age; public int ID; } public void MyMethod()
public class Test { public static void main(String[] args) { } } class Outer
public class doublePrecision { public static void main(String[] args) { double total = 0;
public class WrapperTest { static { print(10); } static void print(int x) { System.out.println(x);
public class WrapperTest { public static void main(String[] args) { Integer i = 100;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.