Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Memory used by Session var

Memory used by Session var

Scheduled Pinned Locked Moved ASP.NET
questionsysadminperformancehelplearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Britney S Morales
    wrote on last edited by
    #1

    Hi Guys, Anyone can help me with this question, When i created a var session like this one Session["Var1"] = "1234567890" which amount memory used the Server to save the var onto Ram Memory Exactly 10 Bytes?, an default memory amount for small var (Ex, 1 Kb) ?¿?¿? :doh: Thanks Gracias

    keep Learning and you never will be out of date...

    E 1 Reply Last reply
    0
    • B Britney S Morales

      Hi Guys, Anyone can help me with this question, When i created a var session like this one Session["Var1"] = "1234567890" which amount memory used the Server to save the var onto Ram Memory Exactly 10 Bytes?, an default memory amount for small var (Ex, 1 Kb) ?¿?¿? :doh: Thanks Gracias

      keep Learning and you never will be out of date...

      E Offline
      E Offline
      ednrgc
      wrote on last edited by
      #2

      You can try a test web page to test it. Try something like this: private ProcessInfo po; public int GetIteration { set{ ViewState["Iteration"] = value; } get { if(ViewState["Iteration"] != null ) { return (int)ViewState["Iteration"]; } return 0; } } private void Page_Load(object sender, System.EventArgs e) { po = ProcessModelInfo.GetCurrentProcessInfo(); if( !Page.IsPostBack) { lblOriginal.Text = po.PeakMemoryUsed.ToString(); } } private void Button1_Click(object sender, System.EventArgs e) { // Add to session for( int i=0;i<100000;i++) { Session["Test" + GetIteration.ToString()] = "1234567890"; GetIteration = GetIteration + 1; } lblCurrent.Text = po.PeakMemoryUsed.ToString(); }

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups