Beispiel #1
0
 /// <summary>
 /// Sets the memory utilization model for the whole app.
 /// This setting is NOT configurable. It may be set at process entrypoint via a call to
 /// App.SetMemoryModel() before the app contrainer spawns.
 /// Typical applications should not change the defaults.
 /// Some system service providers may examine this property to allocate less cache and temp buffers
 /// in the memory-constrained environments
 /// </summary>
 public static void SetMemoryModel(MemoryUtilizationModel model)
 {
     if (Available)
     {
         throw new NFXException(StringConsts.APP_SET_MEMORY_MODEL_ERROR);
     }
     s_MemoryModel = model;
 }
Beispiel #2
0
        /// <summary>
        /// Sets the memory utilization model for the whole app.
        /// This setting is NOT configurable. It may be set at process entry-point via a call to
        /// App.SetMemoryModel() before the app container spawns.
        /// Typical applications should not change the defaults.
        /// Some system service providers may examine this property to allocate less cache and temp buffers
        /// in the memory-constrained environments
        /// </summary>
        public static void SetMemoryModel(MemoryUtilizationModel model)
        {
            var app = ExecutionContext.Application;

            if (app != null && !(app is NOPApplication))
            {
                throw new AzosException(StringConsts.APP_SET_MEMORY_MODEL_ERROR);
            }

            s_MemoryModel = model;
        }