# MX\_MEMORY
> [HTML Version](mx_memory.htm)
**xcall MIAMEX, MX\_MEMORY, newsizk, status**
MX\_MEMORY (MIAMEX 113) allows you to change the size of your user memory partition on the fly, although not within a function or procedure.
**Parameters**
_newsizk_
is the desired new size (in Kilobyte units, e.g. 1024 = 1024K).
_status_ (F6)
| **Value** | **Meaning** |
|------|------|
| 0 | successful |
| \-1 | invalid—pathologically small—_newsizk_ value. |
| \-2 | the program is currently executing a function or procedure; this conflicts with the memory resize operation due to inter-dependencies between the partition and the function call stack. |
**See Also**
• MEMORY.LIT, which is implemented via the MX\_MEMORY function.
• The [MEMORY](memory_sp.htm.md) system parameter.